x86: traps_32.c - use KSYM_NAME_LEN instead of numeric value
PATCH 1/1 x86: traps_32.c - use KSYM_NAME_LEN instead of numeric value
It's safer to use KSYM_NAME_LEN instead of numeric constant because we could get buffer overrun someday if KSYM_NAME_LEN would be changed to a bigger value.
Signed-off-by Cyrill Gorcunov <[email protected]>
---
I've patched 64bit version but forgot about 32bit. So lets fix it too.
arch/x86/kernel/traps_32.c +1 -1
@@ -109,7 +109,7 @@ void printk_address(unsigned long addresconst char *symname;char *modname;char *delim =":" ; -char namebuf[128 ]; +char namebuf[KSYM_NAME_LEN ];char reliab[4 ] ="" ; symname = kallsyms_lookup(address, &symsize, &offset,
Ingo Molnar
AppliedQuoted 3 lines · Cyrill Gorcunov
It's safer to use
KSYM_NAME_LENinstead of numeric constant because we could get buffer overrun someday ifKSYM_NAME_LENwould be changed to a bigger value.
thanks, applied.
Ingo