xxd: do not try reading from closed stdin when non-existent file is given
Was: xxd: FILE: No such file or directory xxd: FILE: Bad file descriptor function old new delta next 276 278 +2 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
parent
4d16161797
commit
25fe2d50bd
@ -357,6 +357,7 @@ static NOINLINE int next(priv_dumper_t *dumper)
|
|||||||
if (!freopen(fname, "r", stdin)) {
|
if (!freopen(fname, "r", stdin)) {
|
||||||
bb_simple_perror_msg(fname);
|
bb_simple_perror_msg(fname);
|
||||||
dumper->exitval = 1;
|
dumper->exitval = 1;
|
||||||
|
dumper->next__done = 1;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user