mirror of
https://github.com/openRuyi-Project/openRuyi.git
synced 2026-04-28 11:03:42 +00:00
32 lines
883 B
Diff
32 lines
883 B
Diff
From adceff0ab6e3d8bf43de52e2c2fbebf27db30deb Mon Sep 17 00:00:00 2001
|
|
From: Jeff Layton <jlayton@kernel.org>
|
|
Date: Mon, 27 Feb 2023 14:39:27 -0500
|
|
Subject: linearize.c: fix buffer overrun warning from fortify
|
|
|
|
The resulting string from snprintf, won't be nearly 64 bytes, but "buf"
|
|
is only 16 bytes long here. This causes FORTIFY_SOURCE to complain when
|
|
given the right options.
|
|
|
|
Signed-off-by: Jeff Layton <jlayton@kernel.org>
|
|
Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
|
|
---
|
|
linearize.c | 2 +-
|
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
|
diff --git a/linearize.c b/linearize.c
|
|
index d9aed61b..1db2d505 100644
|
|
--- a/linearize.c
|
|
+++ b/linearize.c
|
|
@@ -91,7 +91,7 @@ const char *show_label(struct basic_block *bb)
|
|
|
|
if (!bb)
|
|
return ".L???";
|
|
- snprintf(buf, 64, ".L%u", bb->nr);
|
|
+ snprintf(buf, 16, ".L%u", bb->nr);
|
|
return buf;
|
|
}
|
|
|
|
--
|
|
cgit 1.2.3-korg
|
|
|