Searched hist:"0 a6047eef1c465c38aacfbdab193161b3f0cd144" (Results 1 – 1 of 1) sorted by relevance
/openbmc/linux/lib/ |
H A D | vsprintf.c | diff 0a6047eef1c465c38aacfbdab193161b3f0cd144 Wed Jun 28 19:09:34 CDT 2006 Linus Torvalds <torvalds@g5.osdl.org> Fix vsnprintf off-by-one bug
The recent vsnprintf() fix introduced an off-by-one, and it's now possible to overrun the target buffer by one byte.
The "end" pointer points to past the end of the buffer, so if we have to truncate the result, it needs to be done though "end[-1]".
[ This is just an alternate and simpler patch to one proposed by Andrew and Jeremy, who actually noticed the problem ]
Acked-by: Andrew Morton <akpm@osdl.org> Acked-by: Jeremy Fitzhardinge <jeremy@goop.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
|