]> git.baikalelectronics.ru Git - kernel.git/commit
sysctl: make sure to terminate strings with a NUL
authorLinus Torvalds <torvalds@g5.osdl.org>
Sun, 1 Jan 2006 01:00:29 +0000 (17:00 -0800)
committerLinus Torvalds <torvalds@g5.osdl.org>
Sun, 1 Jan 2006 01:00:29 +0000 (17:00 -0800)
commit62a1a90352fe05cc521b8747e93c7f281ad7eb73
treeef7805d1e03e8648fbaca3713d1a749c27770339
parent809f2276fa54dd5fd9a6a13a710800a6bfb85947
sysctl: make sure to terminate strings with a NUL

This is a slightly more complete fix for the previous minimal sysctl
string fix.  It always terminates the returned string with a NUL, even
if the full result wouldn't fit in the user-supplied buffer.

The returned length is the full untruncated length, so that you can
tell when truncation has occurred.

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