[PATCH] objtool: Fix a theoretical string buffer overflow

Adam Borowski posted 1 patch 4 years, 6 months ago
tools/objtool/check.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
[PATCH] objtool: Fix a theoretical string buffer overflow
Posted by Adam Borowski 4 years, 6 months ago
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 <kilobyte@angband.pl>
---
 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