<p>lynxis lazus has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.osmocom.org/c/osmo-sgsn/+/20395">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">gtphub: fix compilation with gcc 10.2.0<br><br>gtphub.c:2915:2: error: ‘snprintf’ argument 4 may overlap destination object ‘buf’ [-Werror=restrict]<br> 2915 |  snprintf(pos, len, " port %s", portbuf);<br>      |  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br><br>Be better safe and use the stack instead of byte counting in the buffer.<br>Change-Id: I64f1b80657583dde738bc33e8cece6589322f1bf<br><br>Change-Id: Ied9665ce6bd2633797bbc3a2171e911ada357a22<br>---<br>M src/gtphub/gtphub.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://gerrit.osmocom.org:29418/osmo-sgsn refs/changes/95/20395/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/src/gtphub/gtphub.c b/src/gtphub/gtphub.c</span><br><span>index c95696a..699499f 100644</span><br><span>--- a/src/gtphub/gtphub.c</span><br><span>+++ b/src/gtphub/gtphub.c</span><br><span>@@ -2899,9 +2899,9 @@</span><br><span> const char *sgsn_sockaddr_to_strb(const struct sgsn_sockaddr *addr,</span><br><span>                                 char *buf, size_t buf_len)</span><br><span> {</span><br><span style="color: hsl(120, 100%, 40%);">+     char portbuf[6];</span><br><span>     const int portbuf_len = 6;</span><br><span>   OSMO_ASSERT(buf_len > portbuf_len);</span><br><span style="color: hsl(0, 100%, 40%);">-  char *portbuf = buf + buf_len - portbuf_len;</span><br><span>         buf_len -= portbuf_len;</span><br><span>      if (sgsn_sockaddr_to_strs(buf, buf_len,</span><br><span>                                portbuf, portbuf_len,</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/c/osmo-sgsn/+/20395">change 20395</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://gerrit.osmocom.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://gerrit.osmocom.org/c/osmo-sgsn/+/20395"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: osmo-sgsn </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-Change-Id: Ied9665ce6bd2633797bbc3a2171e911ada357a22 </div>
<div style="display:none"> Gerrit-Change-Number: 20395 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: lynxis lazus <lynxis@fe80.eu> </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>