https://osmocom.org/https://osmocom.org/favicon.ico?16647414092019-05-25T13:23:39ZOpen Source Mobile Communicationslibosmocore - Bug #4025: gsm48_decode_bcd_number2(): incorrect output buffer truncationhttps://osmocom.org/issues/4025?journal_id=145992019-05-25T13:23:39Zfixeria
<ul><li><strong>Tags</strong> deleted (<del><i><pre</i></del>)</li></ul> libosmocore - Bug #4025: gsm48_decode_bcd_number2(): incorrect output buffer truncationhttps://osmocom.org/issues/4025?journal_id=146022019-05-25T18:01:17Zfixeria
<ul><li><strong>Project</strong> changed from <i>OsmoMSC</i> to <i>libosmocore</i></li><li><strong>Subject</strong> changed from <i>15-digit long MSISDNs truncated to 14 digits: the last digit is lost</i> to <i>gsm48_decode_bcd_number2(): incorrect output buffer truncation</i></li><li><strong>Category</strong> changed from <i>VLR</i> to <i>libosmogsm</i></li><li><strong>Status</strong> changed from <i>New</i> to <i>Feedback</i></li><li><strong>% Done</strong> changed from <i>0</i> to <i>80</i></li></ul><p>As it turns out, this is a bug of gsm48_decode_bcd_number2() in libosmogsm. Please see:</p>
<p><a class="external" href="https://gerrit.osmocom.org/#/c/libosmocore/+/14184">https://gerrit.osmocom.org/#/c/libosmocore/+/14184</a> gsm0408/gsm0408_test.c: introduce BCD number encoding / decoding test<br /><a class="external" href="https://gerrit.osmocom.org/#/c/libosmocore/+/14185">https://gerrit.osmocom.org/#/c/libosmocore/+/14185</a> gsm/gsm48_ie.c: fix output truncation in gsm48_decode_bcd_number2()<br /><a class="external" href="https://gerrit.osmocom.org/#/c/libosmocore/+/14186">https://gerrit.osmocom.org/#/c/libosmocore/+/14186</a> gsm48_decode_bcd_number2(): fix: return -ENOSPC on truncation<br /><a class="external" href="https://gerrit.osmocom.org/#/c/libosmocore/+/14187">https://gerrit.osmocom.org/#/c/libosmocore/+/14187</a> gsm48_decode_bcd_number2(): return -EINVAL if LV has too big length</p>
<p>Change number 14185 fixes the problem. Waiting for review now...</p> libosmocore - Bug #4025: gsm48_decode_bcd_number2(): incorrect output buffer truncationhttps://osmocom.org/issues/4025?journal_id=146272019-05-28T08:39:20Zfixeria
<ul><li><strong>Status</strong> changed from <i>Feedback</i> to <i>Resolved</i></li><li><strong>% Done</strong> changed from <i>80</i> to <i>100</i></li></ul><p>Merged.</p>