<p>Harald Welte has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.osmocom.org/10433">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">layer23: Fix compiler warning about snprintf buffer too small<br><br>gsm322.c:366:22: warning: ‘sprintf’ may write a terminating nul past the end of the destination [-Wformat-overflow=]<br>  sprintf(string, "-%d", 110 - rxlev);<br>                      ^<br>gsm322.c:366:2: note: ‘sprintf’ output between 3 and 6 bytes into a destination of size 5<br>  sprintf(string, "-%d", 110 - rxlev);<br><br>Change-Id: I7b19fef89ba0cb0c1edbdd62c46ad8395e44145b<br>---<br>M src/host/layer23/src/mobile/gsm322.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/osmocom-bb refs/changes/33/10433/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/src/host/layer23/src/mobile/gsm322.c b/src/host/layer23/src/mobile/gsm322.c</span><br><span>index c3485b6..21cf8f3 100644</span><br><span>--- a/src/host/layer23/src/mobile/gsm322.c</span><br><span>+++ b/src/host/layer23/src/mobile/gsm322.c</span><br><span>@@ -358,7 +358,7 @@</span><br><span> </span><br><span> char *gsm_print_rxlev(uint8_t rxlev)</span><br><span> {</span><br><span style="color: hsl(0, 100%, 40%);">-      static char string[5];</span><br><span style="color: hsl(120, 100%, 40%);">+        static char string[6];</span><br><span>       if (rxlev == 0)</span><br><span>              return "<=-110";</span><br><span>        if (rxlev >= 63)</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/10433">change 10433</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/10433"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: osmocom-bb </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>
<div style="display:none"> Gerrit-Change-Id: I7b19fef89ba0cb0c1edbdd62c46ad8395e44145b </div>
<div style="display:none"> Gerrit-Change-Number: 10433 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Harald Welte <laforge@gnumonks.org> </div>