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:
parent
c8268a9fbc
commit
6fa4125491
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user