Skip to content

Commit 9307fb9

Browse files
Dan CarpenterSasha Levin
authored andcommitted
sparc64: make string buffers large enough
[ Upstream commit b5c3206 ] 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]> Signed-off-by: Sasha Levin <[email protected]>
1 parent b865f70 commit 9307fb9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

arch/sparc/kernel/traps_64.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ static void dump_tl1_traplog(struct tl1_traplog *p)
8585

8686
void bad_trap(struct pt_regs *regs, long lvl)
8787
{
88-
char buffer[32];
88+
char buffer[36];
8989
siginfo_t info;
9090

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

117117
void bad_trap_tl1(struct pt_regs *regs, long lvl)
118118
{
119-
char buffer[32];
119+
char buffer[36];
120120

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

0 commit comments

Comments
 (0)