Skip to content

Commit

Permalink
sparc64: make string buffers large enough
Browse files Browse the repository at this point in the history
commit b5c3206 upstream.

My static checker complains that if "lvl" is ULONG_MAX (this is 64 bit)
then some of the strings will overflow.  I don't know if that's possible
but it seems simple enough to make the buffers slightly larger.

Signed-off-by: Dan Carpenter <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
Cc: Waldemar Brodkorb <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
  • Loading branch information
Dan Carpenter authored and gregkh committed Jun 17, 2017
1 parent d80aa84 commit 39e84dc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions arch/sparc/kernel/traps_64.c
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ static void dump_tl1_traplog(struct tl1_traplog *p)

void bad_trap(struct pt_regs *regs, long lvl)
{
char buffer[32];
char buffer[36];
siginfo_t info;

if (notify_die(DIE_TRAP, "bad trap", regs,
Expand Down Expand Up @@ -116,7 +116,7 @@ void bad_trap(struct pt_regs *regs, long lvl)

void bad_trap_tl1(struct pt_regs *regs, long lvl)
{
char buffer[32];
char buffer[36];

if (notify_die(DIE_TRAP_TL1, "bad trap tl1", regs,
0, lvl, SIGTRAP) == NOTIFY_STOP)
Expand Down

0 comments on commit 39e84dc

Please sign in to comment.