]> git.ipfire.org Git - thirdparty/util-linux.git/commit
tailf: do not allow minus signed last lines argument
authorSami Kerola <kerolasa@iki.fi>
Sun, 15 Feb 2015 17:12:03 +0000 (17:12 +0000)
committerKarel Zak <kzak@redhat.com>
Thu, 5 Mar 2015 09:31:18 +0000 (10:31 +0100)
commit16d3d9a04d5d2a7f4f10c3658cccc5aa0c7cd0af
tree6615ad4f2450ad0550202d2a20daf89f215aa747
parenta260b21bdb7a1592523de41bb09a13f9f460684d
tailf: do not allow minus signed last lines argument

Before mmap() the command behavior was not completely correct, as
demonstrated below, and after the mmap() it tried to print some eighteen
quintillion lines.

$ tailf -n-1 x
tailf: cannot allocate 18446744073709543424 bytes: Cannot allocate memory

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
text-utils/tailf.c