]> git.ipfire.org Git - thirdparty/util-linux.git/commit
tailf: Fix segmentation fault in tailf on 32 bit
authorTobias Stoeckmann <tobias@stoeckmann.org>
Sun, 10 Jul 2016 14:14:08 +0000 (16:14 +0200)
committerKarel Zak <kzak@redhat.com>
Thu, 14 Jul 2016 10:09:51 +0000 (12:09 +0200)
commite3684760501439abce5b480e1d0a432a626e21f4
tree4f489ea7dcb3924cb0bc403c041f1d1d4a415aa0
parent04c163ed167ee5e28eff923263e0d6132759936c
tailf: Fix segmentation fault in tailf on 32 bit

tailf crashes with a segmentation fault when used with a file that is
exactly 4GB in size due to an integer overflow between off_t and size_t:

$ dd if=/dev/zero of=tailf.crash bs=1 count=1 seek=4294967295
$ tailf tailf.crash
Segmentation fault
$ _

Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
Signed-off-by: Karel Zak <kzak@redhat.com>
text-utils/tailf.c