]> git.baikalelectronics.ru Git - kernel.git/commit
sysctl: don't overflow the user-supplied buffer with '\0'
authorLinus Torvalds <torvalds@g5.osdl.org>
Sat, 31 Dec 2005 01:18:53 +0000 (17:18 -0800)
committerLinus Torvalds <torvalds@g5.osdl.org>
Sat, 31 Dec 2005 01:18:53 +0000 (17:18 -0800)
commitaf1ae48a843bb0e08a241bea1d11ae07c356108f
tree2e1aaa5e4e68057a4e96a606e2ad0bcccedcd6df
parent3d0fedec9b18c5ed97931801d0b5651cb74e9e0f
sysctl: don't overflow the user-supplied buffer with '\0'

If the string was too long to fit in the user-supplied buffer,
the sysctl layer would zero-terminate it by writing past the
end of the buffer. Don't do that.

Noticed by Yi Yang <yang.y.yi@gmail.com>

Signed-off-by: Linus Torvalds <torvalds@osdl.org>
kernel/sysctl.c