<p>pespin has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.osmocom.org/c/osmo-pcu/+/21305">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">csn1: Fix readIndex pointer change in CSN_VARIABLE_ARRAY<br><br>There's actually 3 errors:<br>* Its value should be updated, not the pointer itself<br>* Value should be increased, not decreased<br>* bitvec_read_field() API is already advancing it, no need to do it<br><br>Fixes: OS#4838<br>Change-Id: I009abc373794e148091e637ffee80c6461960945<br>---<br>M src/csn1.c<br>M tests/rlcmac/RLCMACTest.cpp<br>2 files changed, 2 insertions(+), 2 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/05/21305/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/src/csn1.c b/src/csn1.c</span><br><span>index fa29e27..c66f598 100644</span><br><span>--- a/src/csn1.c</span><br><span>+++ b/src/csn1.c</span><br><span>@@ -1216,9 +1216,8 @@</span><br><span> </span><br><span>           while (count > 0)</span><br><span>           {</span><br><span style="color: hsl(0, 100%, 40%);">-            readIndex -= 8;</span><br><span>            *pui8 = bitvec_read_field(vector, readIndex, 8);</span><br><span style="color: hsl(0, 100%, 40%);">-            LOGPC(DCSN1, LOGL_DEBUG, "%s = %u | ", pDescr->sz , (unsigned)*pui8);</span><br><span style="color: hsl(120, 100%, 40%);">+            LOGPC(DCSN1, LOGL_DEBUG, "%s = 0x%x | ", pDescr->sz , (unsigned)*pui8);</span><br><span>             pui8++;</span><br><span>             bit_offset += 8;</span><br><span>             count--;</span><br><span>diff --git a/tests/rlcmac/RLCMACTest.cpp b/tests/rlcmac/RLCMACTest.cpp</span><br><span>index f1b6508..44b05cc 100644</span><br><span>--- a/tests/rlcmac/RLCMACTest.cpp</span><br><span>+++ b/tests/rlcmac/RLCMACTest.cpp</span><br><span>@@ -110,6 +110,7 @@</span><br><span>   "4913e00850884013a8048b2b2b2b2b2b2b2b2b2b2b2b2b", // Polling Request (malformed)</span><br><span>   "412430007fffffffffffffffefd19c7ba12b2b2b2b2b2b", // Packet Uplink Ack Nack?</span><br><span>       "41942b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b", // System Info 13?</span><br><span style="color: hsl(120, 100%, 40%);">+        "40883c1493120000000012000000000000000000000000", // Pkt Paging Request (OS#4838)</span><br><span>  };</span><br><span> </span><br><span>       int testDataSize = sizeof(testData)/sizeof(testData[0]);</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/c/osmo-pcu/+/21305">change 21305</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-pcu/+/21305"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: osmo-pcu </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-Change-Id: I009abc373794e148091e637ffee80c6461960945 </div>
<div style="display:none"> Gerrit-Change-Number: 21305 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: pespin <pespin@sysmocom.de> </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>