summaryrefslogtreecommitdiffstats
path: root/usr.bin/uudecode/uudecode.c
diff options
context:
space:
mode:
authorjmallett <jmallett@FreeBSD.org>2002-04-20 03:33:40 +0000
committerjmallett <jmallett@FreeBSD.org>2002-04-20 03:33:40 +0000
commit45274f17853c8c75d10b1e26d123d311c9b79c12 (patch)
tree655b5d32e3d087731723a6bc318760917bf162a6 /usr.bin/uudecode/uudecode.c
parent64ae9117d81e6a0e9da72d3464a44f2592137b52 (diff)
downloadFreeBSD-src-45274f17853c8c75d10b1e26d123d311c9b79c12.zip
FreeBSD-src-45274f17853c8c75d10b1e26d123d311c9b79c12.tar.gz
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
Diffstat (limited to 'usr.bin/uudecode/uudecode.c')
-rw-r--r--usr.bin/uudecode/uudecode.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/usr.bin/uudecode/uudecode.c b/usr.bin/uudecode/uudecode.c
index 4f54aaa..07b9008 100644
--- a/usr.bin/uudecode/uudecode.c
+++ b/usr.bin/uudecode/uudecode.c
@@ -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
OpenPOWER on IntegriCloud