mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 19:21:31 -04:00
sh: fix format string bug in stack tracer
Kees reported the following error: arch/sh/kernel/dumpstack.c: In function 'print_trace_address': arch/sh/kernel/dumpstack.c:118:2: error: format not a string literal and no format arguments [-Werror=format-security] Use the "%s" format so that it's impossible to interpret 'data' as a format string. Signed-off-by: Matt Fleming <[email protected]> Reported-by: Kees Cook <[email protected]> Acked-by: Kees Cook <[email protected]> Cc: Paul Mundt <[email protected]> Cc: <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
59ecc26004
commit
a0c32761e7
1 changed files with 1 additions and 1 deletions
|
|
@ -115,7 +115,7 @@ static int print_trace_stack(void *data, char *name)
|
|||
*/
|
||||
static void print_trace_address(void *data, unsigned long addr, int reliable)
|
||||
{
|
||||
printk(data);
|
||||
printk("%s", (char *)data);
|
||||
printk_address(addr, reliable);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue