uudecode: fix buggy check for empty filename

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
Denys Vlasenko 2011-10-18 12:07:05 +02:00
parent 6464f15ddb
commit 5f92043c3f

View File

@ -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)) {