aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2011-10-18 12:07:05 +0200
committerDenys Vlasenko <vda.linux@googlemail.com>2011-10-18 12:07:05 +0200
commit5f92043c3f9026725d518b6c76f7ef64cc8d4059 (patch)
treedf9639e123160eae9b38fe9c4e9643c8a3ab0242
parent6464f15ddb67f7c3fac9eb99a1336965537c4d67 (diff)
downloadbusybox-w32-5f92043c3f9026725d518b6c76f7ef64cc8d4059.tar.gz
busybox-w32-5f92043c3f9026725d518b6c76f7ef64cc8d4059.tar.bz2
busybox-w32-5f92043c3f9026725d518b6c76f7ef64cc8d4059.zip
uudecode: fix buggy check for empty filename
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-rw-r--r--coreutils/uudecode.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/coreutils/uudecode.c b/coreutils/uudecode.c
index 6ecfe6cef..23ff711fa 100644
--- a/coreutils/uudecode.c
+++ b/coreutils/uudecode.c
@@ -125,10 +125,11 @@ int uudecode_main(int argc UNUSED_PARAM, char **argv)
125 mode = bb_strtou(line_ptr, NULL, 8); 125 mode = bb_strtou(line_ptr, NULL, 8);
126 if (outname == NULL) { 126 if (outname == NULL) {
127 outname = strchr(line_ptr, ' '); 127 outname = strchr(line_ptr, ' ');
128 if ((outname == NULL) || (*outname == '\0')) { 128 if (!outname)
129 break; 129 break;
130 }
131 outname++; 130 outname++;
131 if (!outname[0])
132 break;
132 } 133 }
133 dst_stream = stdout; 134 dst_stream = stdout;
134 if (NOT_LONE_DASH(outname)) { 135 if (NOT_LONE_DASH(outname)) {