Skip to content

Commit

Permalink
sparc: use %s for unaligned panic
Browse files Browse the repository at this point in the history
Since unaligned_panic() takes a literal string, make sure it can never
accidentally be used as a format string.

Signed-off-by: Kees Cook <keescook@chromium.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Kees Cook authored and David S. Miller committed Jul 22, 2014
1 parent 54dcf0c commit e7fbaf0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/sparc/kernel/unaligned_32.c
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ unsigned long safe_compute_effective_address(struct pt_regs *regs,
/* This is just to make gcc think panic does return... */
static void unaligned_panic(char *str)
{
panic(str);
panic("%s", str);
}

/* una_asm.S */
Expand Down

0 comments on commit e7fbaf0

Please sign in to comment.