From: Denys Vlasenko Date: Tue, 18 Oct 2011 10:07:05 +0000 (+0200) Subject: uudecode: fix buggy check for empty filename X-Git-Tag: 1_20_0~204 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=5f92043c3f9026725d518b6c76f7ef64cc8d4059;p=oweals%2Fbusybox.git uudecode: fix buggy check for empty filename Signed-off-by: Denys Vlasenko --- 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)) {