From 7ed3fe2b472ce39883c79bffacccc3221d6c2b38 Mon Sep 17 00:00:00 2001 From: Martin Roth Date: Mon, 26 Nov 2018 18:03:32 -0700 Subject: 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 Reviewed-on: https://review.coreboot.org/c/29850 Tested-by: build bot (Jenkins) Reviewed-by: Patrick Rudolph Reviewed-by: Paul Menzel --- util/romcc/romcc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'util/romcc') diff --git a/util/romcc/romcc.c b/util/romcc/romcc.c index 307fcf8cfa..4cb2aadcc9 100644 --- a/util/romcc/romcc.c +++ b/util/romcc/romcc.c @@ -3629,7 +3629,7 @@ static void register_builtin_macro(struct compile_state *state, static void register_builtin_macros(struct compile_state *state) { - char buf[30]; + char buf[32]; char scratch[30]; time_t now; struct tm *tm; -- cgit v1.2.3