commit | 25fe2d50bd75097861db9eac8c8c9f238283ff5f | [log] [tgz] |
---|---|---|
author | Denys Vlasenko <vda.linux@googlemail.com> | Fri Jun 18 00:32:29 2021 +0200 |
committer | Denys Vlasenko <vda.linux@googlemail.com> | Fri Jun 18 00:32:29 2021 +0200 |
tree | b384270c881c164644a4ea1a9a641885e090e072 | |
parent | 4d1616179745ee3883a726aaf13468e9c44dff9e [diff] |
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>
diff --git a/libbb/dump.c b/libbb/dump.c index 8c2a370..9c16f1f 100644 --- a/libbb/dump.c +++ b/libbb/dump.c
@@ -357,6 +357,7 @@ if (!freopen(fname, "r", stdin)) { bb_simple_perror_msg(fname); dumper->exitval = 1; + dumper->next__done = 1; continue; } }