<p>Martin Roth has uploaded this change for <strong>review</strong>.</p><p><a href="https://review.coreboot.org/c/coreboot/+/29850">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">romcc: Increase buffer size to fit max string size<br><br>On the updated builder image, the build is failing because the system<br>compiler has been updated to GCC 8.2.0.  It complains about the<br>possibility of overflow when putting one 30 character buffer plus 2<br>characters into another 30 character buffer.  To fix this, increase<br>the recipient buffer size by 2.<br><br>romcc.c:3645:2: note: 'sprintf' output between 3 and 32 bytes into a destination<br>of size 30 [-Werror=format-overflow=]<br>  sprintf(buf, "\"%s\"", scratch);<br>  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br>romcc.c:3649:2: note: 'sprintf' output between 3 and 32 bytes into a destination<br>of size 30 [-Werror=format-overflow=]<br>  sprintf(buf, "\"%s\"", scratch);<br>  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br><br>Change-Id: I7879a7202cc3ff52301b10118fc49fcc601f133e<br>Signed-off-by: Martin Roth <martinroth@google.com><br>---<br>M util/romcc/romcc.c<br>1 file changed, 1 insertion(+), 1 deletion(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://review.coreboot.org:29418/coreboot refs/changes/50/29850/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/util/romcc/romcc.c b/util/romcc/romcc.c</span><br><span>index 307fcf8..4cb2aad 100644</span><br><span>--- a/util/romcc/romcc.c</span><br><span>+++ b/util/romcc/romcc.c</span><br><span>@@ -3629,7 +3629,7 @@</span><br><span> </span><br><span> static void register_builtin_macros(struct compile_state *state)</span><br><span> {</span><br><span style="color: hsl(0, 100%, 40%);">-        char buf[30];</span><br><span style="color: hsl(120, 100%, 40%);">+ char buf[32];</span><br><span>        char scratch[30];</span><br><span>    time_t now;</span><br><span>  struct tm *tm;</span><br><span></span><br></pre><p>To view, visit <a href="https://review.coreboot.org/c/coreboot/+/29850">change 29850</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://review.coreboot.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://review.coreboot.org/c/coreboot/+/29850"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: coreboot </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-Change-Id: I7879a7202cc3ff52301b10118fc49fcc601f133e </div>
<div style="display:none"> Gerrit-Change-Number: 29850 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Martin Roth <martinroth@google.com> </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>