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>
This commit is contained in:
parent
d97eb646e7
commit
7ed3fe2b47
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue