<p><a href="https://gerrit.osmocom.org/12641">View Change</a></p><p>2 comments:</p><ul style="list-style: none; padding: 0;"><li style="margin: 0; padding: 0;"><p><a href="https://gerrit.osmocom.org/#/c/12641/2//COMMIT_MSG">Commit Message:</a></p><ul style="list-style: none; padding: 0;"><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.osmocom.org/#/c/12641/2//COMMIT_MSG@23">Patch Set #2, Line 23:</a> </p><p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;"><pre style="font-family: monospace,monospace; white-space: pre-wrap;">the return value of gsm48_generate_mid_from_imsi()<br>could be 130<br></pre></blockquote></p><p style="white-space: pre-wrap; word-wrap: break-word;">Oh, wow...</p></li></ul></li><li style="margin: 0; padding: 0;"><p><a href="https://gerrit.osmocom.org/#/c/12641/2/src/gsm/gsm48.c">File src/gsm/gsm48.c:</a></p><ul style="list-style: none; padding: 0;"><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.osmocom.org/#/c/12641/2/src/gsm/gsm48.c@668">Patch Set #2, Line 668:</a> <code style="font-family:monospace,monospace">2 + buf[1]</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">Hmm, why do we add 2 here?</p><p style="white-space: pre-wrap; word-wrap: break-word;">We use buf[0], buf[1], and buf[2], and then buf[2 + i], where i starts from 1...</p><p style="white-space: pre-wrap; word-wrap: break-word;">I think one byte is lost, and we should return 3 + buf[1].</p></li></ul></li></ul><p>To view, visit <a href="https://gerrit.osmocom.org/12641">change 12641</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/12641"/><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: comment </div>
<div style="display:none"> Gerrit-Change-Id: Ic8488bc7f77dc9182e372741b88f0f06100dddc9 </div>
<div style="display:none"> Gerrit-Change-Number: 12641 </div>
<div style="display:none"> Gerrit-PatchSet: 2 </div>
<div style="display:none"> Gerrit-Owner: Harald Welte <laforge@gnumonks.org> </div>
<div style="display:none"> Gerrit-Reviewer: Jenkins Builder (1000002) </div>
<div style="display:none"> Gerrit-CC: Vadim Yanitskiy <axilirator@gmail.com> </div>
<div style="display:none"> Gerrit-Comment-Date: Sun, 20 Jan 2019 10:38:54 +0000 </div>
<div style="display:none"> Gerrit-HasComments: Yes </div>
<div style="display:none"> Gerrit-HasLabels: No </div>