diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2011-10-18 14:07:05 +0400 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2011-10-18 14:07:05 +0400 |
commit | 5f92043c3f9026725d518b6c76f7ef64cc8d4059 (patch) | |
tree | df9639e123160eae9b38fe9c4e9643c8a3ab0242 /coreutils/uudecode.c | |
parent | 6464f15ddb67f7c3fac9eb99a1336965537c4d67 (diff) |
uudecode: fix buggy check for empty filename
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'coreutils/uudecode.c')
-rw-r--r-- | coreutils/uudecode.c | 5 |
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) mode = bb_strtou(line_ptr, NULL, 8); if (outname == NULL) { outname = strchr(line_ptr, ' '); - if ((outname == NULL) || (*outname == '\0')) { + if (!outname) break; - } outname++; + if (!outname[0]) + break; } dst_stream = stdout; if (NOT_LONE_DASH(outname)) { |