<p>Vadim Yanitskiy <strong>uploaded patch set #5</strong> to this change.</p><p><a href="https://gerrit.osmocom.org/14185">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">gsm48_decode_bcd_number2(): fix output truncation<br><br>Thanks to the new unit test for BCD number encoding / decoding, it was<br>discovered that gsm48_decode_bcd_number2() does not properly handle<br>encoded LV if the output buffer size is equal to the original MSISDN<br>length + 1 (\0-terminator): one digit is lost.<br><br>For example, decoding of 15-digit long MSISDN to a buffer of size<br>16 (15 digits + 1 for \0) would give us only 14 digits.<br><br>The problem was that 'output_len' was being decremented before<br>checking the remaining buffer length and writing a digit to it.<br>As a result, the maximum length was always one byte shorter.<br><br>Change-Id: I61d49387fedbf7b238e21540a5eff22f6861e27a<br>Fixes: OS#4025<br>---<br>M src/gsm/gsm48_ie.c<br>M tests/gsm0408/gsm0408_test.ok<br>2 files changed, 4 insertions(+), 4 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/85/14185/5</pre><p>To view, visit <a href="https://gerrit.osmocom.org/14185">change 14185</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/14185"/><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: newpatchset </div>
<div style="display:none"> Gerrit-Change-Id: I61d49387fedbf7b238e21540a5eff22f6861e27a </div>
<div style="display:none"> Gerrit-Change-Number: 14185 </div>
<div style="display:none"> Gerrit-PatchSet: 5 </div>
<div style="display:none"> Gerrit-Owner: Vadim Yanitskiy <axilirator@gmail.com> </div>
<div style="display:none"> Gerrit-Reviewer: Harald Welte <laforge@gnumonks.org> </div>
<div style="display:none"> Gerrit-Reviewer: Jenkins Builder (1000002) </div>