]> git.ipfire.org Git - thirdparty/util-linux.git/commit
setterm: segfault with long dump file name
authorSami Kerola <kerolasa@iki.fi>
Sat, 2 Apr 2011 20:56:50 +0000 (22:56 +0200)
committerKarel Zak <kzak@redhat.com>
Tue, 19 Apr 2011 11:09:53 +0000 (13:09 +0200)
commitf7e08f83faae3def36423bee75638f7e69f495a2
tree76fcf050ccf08371d2df8ee11d87239bbe7b0c6e
parent725969b18ee0f5d47c9eb78650d1daaaa66dd115
setterm: segfault with long dump file name

The patch will make too long path to be truncated to MAX_PATH
lenght. If user supplies too long file name that is caught at
fopen. Some users might find this unintuitive, so the altered
behavior will be mantioned in manual page.

Bug in earlier version was visible with a command bellow.

setterm -dump -file $(for i in $(seq 254); do printf x ; done)

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