2021-12-23 18:29:56

by Adam Borowski

[permalink] [raw]
Subject: [PATCH] objtool: Fix a theoretical string buffer overflow

A signed int may %d to up to 10 characters; let's make the variable a bit
longer to avoid the warning.

Signed-off-by: Adam Borowski <[email protected]>
---
tools/objtool/check.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/objtool/check.c b/tools/objtool/check.c
index 21735829b860..750ef1c446c8 100644
--- a/tools/objtool/check.c
+++ b/tools/objtool/check.c
@@ -2823,7 +2823,7 @@ static inline bool func_uaccess_safe(struct symbol *func)

static inline const char *call_dest_name(struct instruction *insn)
{
- static char pvname[16];
+ static char pvname[19];
struct reloc *rel;
int idx;

--
2.34.1