]> git.ipfire.org Git - thirdparty/coreutils.git/commit
tail: use poll, not select
authorPaul Eggert <eggert@cs.ucla.edu>
Sun, 27 Jun 2021 01:23:52 +0000 (18:23 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Sun, 27 Jun 2021 01:40:26 +0000 (18:40 -0700)
commitda0d448bca62c6305fc432f67e2c5ccc2da75346
tree66edb80203a1f0c751f17c7916af833e464be0c0
parent177bfdd7ca7bb7fe602ab04756521c9caeccb413
tail: use poll, not select

This fixes an unlikely stack out-of-bounds write reported by
Stepan Broz via Kamil Dudka (Bug#49209).
* bootstrap.conf (gnulib_modules): Replace select with poll.
* src/tail.c: Do not include <sys/select.h>.
[!_AIX]: Include poll.h.
(check_output_alive) [!_AIX]: Use poll instead of select.
(tail_forever_inotify): Likewise.  Simplify logic, as there is no
need for a ‘while (len <= evbuf_off)’ loop.
NEWS
bootstrap.conf
src/tail.c