<p>Harald Welte has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.osmocom.org/10216">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">ipa_ccm_idtag_parse*: Fix reported length value<br><br>IPA CCM is using a somewhat weird TLV encoding scheme:<br>* 16bit length (of tag and value)<br>* 8bit tag<br>* value<br><br>Our existing code mapping the CCM to 'struct tlv_parse' used the plain<br>length value without accounting for the one-byte tag.<br><br>This patch ensures we only report the length of the "value" part,<br>excluding the tag.<br><br>Change-Id: I435aaa33605bd48635715a2c81aa2d231c1abf51<br>---<br>M src/gsm/ipa.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/libosmocore refs/changes/16/10216/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/src/gsm/ipa.c b/src/gsm/ipa.c</span><br><span>index aecde83..f03bc38 100644</span><br><span>--- a/src/gsm/ipa.c</span><br><span>+++ b/src/gsm/ipa.c</span><br><span>@@ -128,7 +128,7 @@</span><br><span> </span><br><span>          DEBUGPC(DLMI, "%s='%s' ", ipa_ccm_idtag_name(t_tag), cur);</span><br><span> </span><br><span style="color: hsl(0, 100%, 40%);">-                dec->lv[t_tag].len = t_len - len_offset;</span><br><span style="color: hsl(120, 100%, 40%);">+           dec->lv[t_tag].len = t_len - 1 - len_offset;</span><br><span>              dec->lv[t_tag].val = cur;</span><br><span> </span><br><span>             cur += t_len - len_offset;</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/10216">change 10216</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/10216"/><meta itemprop="name" content="View Change"/></div></div>

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