Use fwrite(3) to write out the decoded information, as the b64 decoding stuff

won't NUL terminate the string for us, and so we're liable to pick up trailing
garbage, possibly tons of it.

Pointed out by:	obrien
MFC after:	3 days
This commit is contained in:
Juli Mallett 2002-04-20 03:33:40 +00:00
parent c8268a9fbc
commit 6fa4125491
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=95103

View file

@ -349,7 +349,7 @@ base64_decode(stream)
rv = b64_pton(stream, out, (sizeof(out) / sizeof(out[0])));
if (rv == -1)
errx(1, "b64_pton: error decoding base64 input stream");
printf("%s", out);
fwrite(out, 1, rv, stdout);
}
static void