]> 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>
Wed, 10 Aug 2016 11:08:32 +0000 (13:08 +0200)
commitb3c5bc5c061b26971eb59619ee505d20120a77aa
treec06893761a7fddcf6db408fd689f078077bac36c
parent3ba194dd15ee03235c3192a37dac5cec4d8f76a6
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