1
0
mirror of git://git.sv.gnu.org/coreutils.git synced 2026-02-12 10:22:38 +02:00

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.
This commit is contained in:
Paul Eggert
2021-06-26 18:23:52 -07:00
parent 177bfdd7ca
commit da0d448bca
3 changed files with 51 additions and 69 deletions

View File

@@ -193,6 +193,7 @@ gnulib_modules="
physmem
pipe-posix
pipe2
poll
posix-shell
posixtm
posixver
@@ -227,7 +228,6 @@ gnulib_modules="
save-cwd
savedir
savewd
select
selinux-at
setenv
settime