]> granicus.if.org Git - procps-ng/commit
sysctl: avoid crash when -p file has unexpected input
authorSami Kerola <kerolasa@iki.fi>
Thu, 3 May 2012 18:08:27 +0000 (20:08 +0200)
committerSami Kerola <kerolasa@iki.fi>
Mon, 7 May 2012 07:01:10 +0000 (09:01 +0200)
commitb2c08d1d412aafed706fb829c24ec67feefa4b4e
tree5da7b18fcd2d078badddd750da077e53bdb9ec4b
parente2987888e27173f1a421e75f582ccfbe6fd5d05e
sysctl: avoid crash when -p file has unexpected input

Commit e01765d30b7c4767868d5379fbfb36d1dc15eba4 added is_deprecated(), which
crashed when user had input without without /proc/sys/ subdirectory.  The below
should illustrate how exactly the bug got to be trickered.

$ cat ~/foo
cause = crash
$ ./sysctl -p ~/foo
Segmentation fault

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
sysctl.c