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 /NEWS | |
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 'NEWS')
-rw-r--r-- | NEWS | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -21,6 +21,9 @@ GNU coreutils NEWS -*- outline -*- if it uses helper processes for compression and its parent ignores CHLD signals. [bug introduced in coreutils-6.9] + tail without -f no longer access uninitialized memory + [bug introduced in coreutils-7.6] + timeout is now immune to the signal handling of its parent. Specifically timeout now doesn't exit with an error message if its parent ignores CHLD signals. [bug introduced in coreutils-7.6] |