Martin Roth has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/29850
Change subject: romcc: Increase buffer size to fit max string size ......................................................................
romcc: Increase buffer size to fit max string size
On the updated builder image, the build is failing because the system compiler has been updated to GCC 8.2.0. It complains about the possibility of overflow when putting one 30 character buffer plus 2 characters into another 30 character buffer. To fix this, increase the recipient buffer size by 2.
romcc.c:3645:2: note: 'sprintf' output between 3 and 32 bytes into a destination of size 30 [-Werror=format-overflow=] sprintf(buf, ""%s"", scratch); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ romcc.c:3649:2: note: 'sprintf' output between 3 and 32 bytes into a destination of size 30 [-Werror=format-overflow=] sprintf(buf, ""%s"", scratch); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Change-Id: I7879a7202cc3ff52301b10118fc49fcc601f133e Signed-off-by: Martin Roth martinroth@google.com --- M util/romcc/romcc.c 1 file changed, 1 insertion(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/50/29850/1
diff --git a/util/romcc/romcc.c b/util/romcc/romcc.c index 307fcf8..4cb2aad 100644 --- a/util/romcc/romcc.c +++ b/util/romcc/romcc.c @@ -3629,7 +3629,7 @@
static void register_builtin_macros(struct compile_state *state) { - char buf[30]; + char buf[32]; char scratch[30]; time_t now; struct tm *tm;