]> git.ipfire.org Git - thirdparty/coreutils.git/commit
wc: fix wrong byte counts when using --files-from0
authorWilliam R. Fraser <wfraser@codewise.org>
Mon, 21 Mar 2016 00:44:09 +0000 (17:44 -0700)
committerPádraig Brady <P@draigBrady.com>
Mon, 19 Dec 2016 20:13:51 +0000 (20:13 +0000)
commit9944e4763bb178852727812e8b188540772384e2
tree02803ee9f30391c6c9c1520fd61fe7f57099af95
parentf071b04afaeefbf6c37a00986fec02b8df5e9560
wc: fix wrong byte counts when using --files-from0

* src/wc.c (main): Reset fstatus[0].failed between files when reusing
the fstatus[0] entry in --files-from0 mode.  This ensures a stat() is
done for each file, avoiding incorrect counts and redundant reading.
* NEWS: Mention the bug fix.
* tests/misc/wc-files0.sh: Add a test case.
Fixes http://bugs.gnu.org/23073
NEWS
src/wc.c
tests/misc/wc-files0.sh