lib/test_printf.c: check for out-of-bound writes
authorRasmus Villemoes <[email protected]>
Sat, 16 Jan 2016 00:58:53 +0000 (16:58 -0800)
committerLinus Torvalds <[email protected]>
Sat, 16 Jan 2016 19:17:28 +0000 (11:17 -0800)
commit331e4deb6dfdac50d3f9c4ccbc41b1427335e212
tree3a755146ef906973c041b7c3db2697852e4749f3
parentfd0515d50ff33865d0f8cdd74510e8bd1aee88ac
lib/test_printf.c: check for out-of-bound writes

Add a few padding bytes on either side of the test buffer, and check
that these (and the part of the buffer not used) are untouched by
vsnprintf.

Signed-off-by: Rasmus Villemoes <[email protected]>
Acked-by: Kees Cook <[email protected]>
Cc: Al Viro <[email protected]>
Cc: Andy Shevchenko <[email protected]>
Cc: Ingo Molnar <[email protected]>
Cc: Joe Perches <[email protected]>
Cc: Maurizio Lombardi <[email protected]>
Cc: Tejun Heo <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
lib/test_printf.c