diff options
author | Jim Meyering <meyering@redhat.com> | 2009-12-11 12:15:13 +0100 |
---|---|---|
committer | Jim Meyering <meyering@redhat.com> | 2009-12-11 12:15:13 +0100 |
commit | fc4d3f63b0c64992014b035e8b780eb230e0c855 (patch) | |
tree | bcc8b7437eae0cbcfdaf0a63a85513637eedb5bf /tests | |
parent | 3df2108b0d8fee99a3d7344db13fc3200da08f07 (diff) | |
download | coreutils-fc4d3f63b0c64992014b035e8b780eb230e0c855.tar.xz |
tail: don't call fstat on an uninitialized FD
This bug showed up via valgrind as a "Conditional jump or move
depends on uninitialized value(s)" error.
* src/tail.c (ignore_fifo_and_pipe): New function.
(main): Use it only when tailing forever.
The code to compute n_viable and mark some F[i] as ignored would call
isapipe on an uninitialized file descriptor. But n_viable and those
.ignored marks are useful/used only when tailing forever. This bug
was introduced via commit f0ff8c73 (7.6), "tail: make the new
piped-stdin test as portable as the old one".
* NEWS (Bug fixes): Mention it.
Diffstat (limited to 'tests')
0 files changed, 0 insertions, 0 deletions