aboutsummaryrefslogtreecommitdiff
path: root/usr.bin/uudecode
diff options
context:
space:
mode:
authorTony Finch <fanf@FreeBSD.org>2003-03-18 14:19:26 +0000
committerTony Finch <fanf@FreeBSD.org>2003-03-18 14:19:26 +0000
commit55d8d447bf7fc06852dd096935001cf5913af737 (patch)
tree86287e35266eb0e7dc27245eda4ac67ec0c211ae /usr.bin/uudecode
parent3b8a7d4f4f7dce2d7fa2201ef2b65b9d166dd574 (diff)
downloadsrc-55d8d447bf7fc06852dd096935001cf5913af737.tar.gz
src-55d8d447bf7fc06852dd096935001cf5913af737.zip
The POSIXly-correct /dev/stdout handling added in rev 1.44 makes
careless users vulnerable to terminal control sequence attacks, since they expect uudecode to just drop (or overwrite) a file in the current directory. POSIX also says that the full pathname from the input should be used when writing a file, which we only do if the -s (shoot me in the foot) option is specified; therefore this revision means that you now need to use -s for standard /dev/stdout handling.
Notes
Notes: svn path=/head/; revision=112377
Diffstat (limited to 'usr.bin/uudecode')
-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 88ef4551b2d7..0c1e3861500b 100644
--- a/usr.bin/uudecode/uudecode.c
+++ b/usr.bin/uudecode/uudecode.c
@@ -247,7 +247,7 @@ decode2(void)
}
q = memcpy(p - n, pw->pw_dir, n);
}
- } else if (strcmp(q, "/dev/stdout") != 0) {
+ } else {
/* strip down to leaf name */
p = strrchr(q, '/');
if (p != NULL)