arch: alpha: kernel: sprintf(), the minimal buffer length is 20 for "0xffffffffffffffff\n"
Subsystems (2)
PATCH 1/1 arch: alpha: kernel: sprintf(), the minimal buffer length is 20 for "0xffffffffffffffff\n"
For 'opcode_str' in sprintf(), the maximize length of format "0x%llx\n" is 20 ("0xffffffffffffffff\n"), so need define 'opcode_str' at least 20 length.
Or the big number comes, it will cause issue.
Signed-off-by Chen Gang <[email protected]>
--- arch/alpha/kernel/err_marvel.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
arch/alpha/kernel/err_marvel.c +1 -1
@@ -275,7 +275,7 @@ marvel_print_po7_uncrr_sym(u64 uncrr_sym, u64 valid_mask)static void marvel_print_po7_ugbge_sym (u64 ugbge_sym) { -char opcode_str[10 ]; +char opcode_str[20 ];#define IO7__PO7_UGBGE_SYM__UPH_PKT_OFF__S (6)#define IO7__PO7_UGBGE_SYM__UPH_PKT_OFF__M (0xfffffffful)
Signature · 1 line
1.7.7.6