diff options
| author | Juli Mallett <jmallett@FreeBSD.org> | 2002-04-20 02:33:30 +0000 |
|---|---|---|
| committer | Juli Mallett <jmallett@FreeBSD.org> | 2002-04-20 02:33:30 +0000 |
| commit | c8268a9fbcd97fc88625a4bb5e6549922298e40c (patch) | |
| tree | 09939c7b1b64453702ba4527d86f505b3f200087 /usr.bin | |
| parent | c636dc438189747d2397388614a19458fce9ee89 (diff) | |
Notes
Diffstat (limited to 'usr.bin')
| -rw-r--r-- | usr.bin/uudecode/uudecode.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/usr.bin/uudecode/uudecode.c b/usr.bin/uudecode/uudecode.c index 7d812dd209436..4f54aaa08e886 100644 --- a/usr.bin/uudecode/uudecode.c +++ b/usr.bin/uudecode/uudecode.c @@ -342,6 +342,10 @@ base64_decode(stream) unsigned char out[MAXPATHLEN * 4]; int rv; + if (index(stream, '\r') != NULL) + *index(stream, '\r') = '\0'; + if (index(stream, '\n') != NULL) + *index(stream, '\n') = '\0'; rv = b64_pton(stream, out, (sizeof(out) / sizeof(out[0]))); if (rv == -1) errx(1, "b64_pton: error decoding base64 input stream"); |
