1
0

0001-sparc64-make-string-buffers-large-enough.patch 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. From b5c3206190f1fddd100b3060eb15f0d775ffeab8 Mon Sep 17 00:00:00 2001
  2. From: Dan Carpenter <dan.carpenter@oracle.com>
  3. Date: Fri, 25 Nov 2016 14:03:55 +0300
  4. Subject: [PATCH] sparc64: make string buffers large enough
  5. My static checker complains that if "lvl" is ULONG_MAX (this is 64 bit)
  6. then some of the strings will overflow. I don't know if that's possible
  7. but it seems simple enough to make the buffers slightly larger.
  8. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
  9. Signed-off-by: David S. Miller <davem@davemloft.net>
  10. Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>
  11. ---
  12. arch/sparc/kernel/traps_64.c | 4 ++--
  13. 1 file changed, 2 insertions(+), 2 deletions(-)
  14. diff --git a/arch/sparc/kernel/traps_64.c b/arch/sparc/kernel/traps_64.c
  15. index 4094a51..496fa92 100644
  16. --- a/arch/sparc/kernel/traps_64.c
  17. +++ b/arch/sparc/kernel/traps_64.c
  18. @@ -85,7 +85,7 @@ static void dump_tl1_traplog(struct tl1_traplog *p)
  19. void bad_trap(struct pt_regs *regs, long lvl)
  20. {
  21. - char buffer[32];
  22. + char buffer[36];
  23. siginfo_t info;
  24. if (notify_die(DIE_TRAP, "bad trap", regs,
  25. @@ -116,7 +116,7 @@ void bad_trap(struct pt_regs *regs, long lvl)
  26. void bad_trap_tl1(struct pt_regs *regs, long lvl)
  27. {
  28. - char buffer[32];
  29. + char buffer[36];
  30. if (notify_die(DIE_TRAP_TL1, "bad trap tl1", regs,
  31. 0, lvl, SIGTRAP) == NOTIFY_STOP)
  32. --
  33. 2.1.4