<p><a href="https://gerrit.osmocom.org/12227">View Change</a></p><p>1 comment:</p><ul style="list-style: none; padding: 0;"><li style="margin: 0; padding: 0;"><p><a href="https://gerrit.osmocom.org/#/c/12227/3/src/gprs/sgsn_auth.c">File src/gprs/sgsn_auth.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/12227/3/src/gprs/sgsn_auth.c@58">Patch Set #3, Line 58:</a> <code style="font-family:monospace,monospace">         return true;</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">The docstring says the imsi is truncated if we return true from this function.<br>"truncated" implies that dst contains all imsi data up to MAX_DIGITS, and any remaining imsi data beyond MAX_DIGITS will be missing from dst.<br>But in fact, when we return true here, the destination buffer is still empty - it does not contain any imsi data!<br>So this is a contradiciton.</p><p style="white-space: pre-wrap; word-wrap: break-word;">I cannot actully tell what this code intends to do.<br>It looks to me like either the docstring or the code should be fixed.</p></li></ul></li></ul><p>To view, visit <a href="https://gerrit.osmocom.org/12227">change 12227</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/12227"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: osmo-sgsn </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-MessageType: comment </div>
<div style="display:none"> Gerrit-Change-Id: Ic3dff108148683b107e9edac430a0475283580e9 </div>
<div style="display:none"> Gerrit-Change-Number: 12227 </div>
<div style="display:none"> Gerrit-PatchSet: 3 </div>
<div style="display:none"> Gerrit-Owner: Max <msuraev@sysmocom.de> </div>
<div style="display:none"> Gerrit-Reviewer: Jenkins Builder (1000002) </div>
<div style="display:none"> Gerrit-Reviewer: Max <msuraev@sysmocom.de> </div>
<div style="display:none"> Gerrit-Reviewer: Pau Espin Pedrol <pespin@sysmocom.de> </div>
<div style="display:none"> Gerrit-CC: Stefan Sperling <stsp@stsp.name> </div>
<div style="display:none"> Gerrit-Comment-Date: Mon, 10 Dec 2018 19:35:50 +0000 </div>
<div style="display:none"> Gerrit-HasComments: Yes </div>
<div style="display:none"> Gerrit-HasLabels: No </div>