summaryrefslogtreecommitdiff
path: root/util/romcc
diff options
context:
space:
mode:
authorMartin Roth <martinroth@google.com>2018-11-26 18:03:32 -0700
committerPatrick Georgi <pgeorgi@google.com>2018-11-28 11:47:32 +0000
commit7ed3fe2b472ce39883c79bffacccc3221d6c2b38 (patch)
tree1f91edb5f0cdf978e64f1fa9e6b2c9652367c960 /util/romcc
parentd97eb646e75e33c5a4068c21fb20b75ef2acb820 (diff)
downloadcoreboot-7ed3fe2b472ce39883c79bffacccc3221d6c2b38.tar.xz
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> Reviewed-on: https://review.coreboot.org/c/29850 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Patrick Rudolph <siro@das-labor.org> Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Diffstat (limited to 'util/romcc')
-rw-r--r--util/romcc/romcc.c2
1 files changed, 1 insertions, 1 deletions
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;