]> git.ipfire.org Git - thirdparty/coreutils.git/commit
tail: avoid read-beyond-end-of-buffer error
authorJim Meyering <meyering@redhat.com>
Tue, 29 Dec 2009 13:24:01 +0000 (14:24 +0100)
committerJim Meyering <meyering@redhat.com>
Tue, 29 Dec 2009 13:24:01 +0000 (14:24 +0100)
commit66b15949df877a75a413ad40e88aa89c3c467d34
treec34b67ce91d6cd0a0a4e4b08584bca75b89e67ce
parent3d09e31e07ed3dc27df5684d2cd3a6138e0451c3
tail: avoid read-beyond-end-of-buffer error

* src/tail.c (tail_forever_inotify): Do not use f[i] in a context
where i may be larger than the largest valid index.  In the final
"if" clause in which we'd remove an inotify watch, we might have
used f[n_files].  Use fspec instead, since it is guaranteed to
be defined.
src/tail.c