1
0
mirror of git://git.sv.gnu.org/coreutils.git synced 2026-08-18 01:18:51 +02:00

Avoid a used-uninitialized bug for invalid input, i.e., when the size

of the input, not counting newlines, is 1 % 4.
* gl/lib/base64.c (base64_decode): Don't hard-code inlen==4.
It may be smaller when flushing.
This commit is contained in:
Jim Meyering
2007-01-05 12:30:51 +01:00
parent 4082e3be7c
commit ab58de37e6
2 changed files with 8 additions and 1 deletions
+7
View File
@@ -1,3 +1,10 @@
2007-01-05 Jim Meyering <jim@meyering.net>
Avoid a used-uninitialized bug for invalid input, i.e., when the size
of the input, not counting newlines, is 1 % 4.
* gl/lib/base64.c (base64_decode): Don't hard-code inlen==4.
It may be smaller when flushing.
2007-01-05 Mike Frysinger <vapier@gentoo.org>
* src/dircolors.hin: Add a TERM directive for cons25.
+1 -1
View File
@@ -506,7 +506,7 @@ base64_decode (struct base64_decode_context *ctx,
inlen = 0;
break;
}
if (!decode_4 (non_nl, 4, &out, &outleft))
if (!decode_4 (non_nl, inlen, &out, &outleft))
break;
inlen = in_end - in;