base64: fix off-by-one buffer size bug
authorPaul Eggert <eggert@cs.ucla.edu>
Wed, 10 Aug 2011 19:36:13 +0000 (12:36 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Wed, 10 Aug 2011 19:36:31 +0000 (12:36 -0700)
commit08c11765d4fe790403229496a8a3ec625a3ca5af
tree4847db03da63f7604a4e7651020fb9879e391119
parent5b9e0c3ce734b9d9b0c0001e31b65a8a4713700d
base64: fix off-by-one buffer size bug

Problem and (trivial) fix reported by Gijs van Tulder in
<http://lists.gnu.org/archive/html/bug-gnulib/2011-08/msg00083.html>.
* lib/base64.c (base64_decode_alloc_ctx): Allocate one more byte.
* tests/test-base64.c (main): Catch the bug.
ChangeLog
lib/base64.c
tests/test-base64.c