]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
sparc64: make string buffers large enough
authorDan Carpenter <dan.carpenter@oracle.com>
Fri, 25 Nov 2016 11:03:55 +0000 (14:03 +0300)
committerDavid S. Miller <davem@davemloft.net>
Mon, 12 Dec 2016 02:15:48 +0000 (18:15 -0800)
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 <dan.carpenter@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
arch/sparc/kernel/traps_64.c

index 4094a51b19708d0174712c36f8f8556a6a87c083..496fa926e1e003ef85fc6ec7303b1db1ea1b8763 100644 (file)
@@ -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,
@@ -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)