<p>Patch set 2:<span style="border-radius: 3px; display: inline-block; margin: 0 2px; padding: 4px;background-color: #ffd4d4;">Code-Review -1</span></p><p><a href="https://gerrit.osmocom.org/12227">View Change</a></p><p>5 comments:</p><ul style="list-style: none; padding: 0;"><li style="margin: 0; padding: 0;"><p><a href="https://gerrit.osmocom.org/#/c/12227/2/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/2/src/gprs/sgsn_auth.c@46">Patch Set #2, Line 46:</a> <code style="font-family:monospace,monospace">static bool imsi_sanitize(char *dst, size_t dst_len, const char *imsi)</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">Document minimally what this function does.</p></li><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.osmocom.org/#/c/12227/2/src/gprs/sgsn_auth.c@53">Patch Set #2, Line 53:</a> <code style="font-family:monospace,monospace">             return true;</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">This return code looks weird, returning true if it did nothing on the dst buffer and false otherwise.</p></li><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.osmocom.org/#/c/12227/2/src/gprs/sgsn_auth.c@65">Patch Set #2, Line 65:</a> <code style="font-family:monospace,monospace">       if (imsi_sanitize(imsi_sanitized, sizeof(imsi_sanitized), imsi))</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">same as comment in sgsn_acl_add.</p></li><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.osmocom.org/#/c/12227/2/src/gprs/sgsn_auth.c@89">Patch Set #2, Line 89:</a> <code style="font-family:monospace,monospace">        if (imsi_sanitize(acl->imsi, sizeof(acl->imsi), imsi))</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">I think sanitizing the imsi should be done by caller of sgsn_acl_* based on where the information come from (from the wire or from known sanitized source). Is there any good reason to do it here?</p></li></ul></li><li style="margin: 0; padding: 0;"><p><a href="https://gerrit.osmocom.org/#/c/12227/2/src/gprs/sgsn_vty.c">File src/gprs/sgsn_vty.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/2/src/gprs/sgsn_vty.c@a650">Patch Set #2, Line 650:</a> <code style="font-family:monospace,monospace"></code></p><p style="white-space: pre-wrap; word-wrap: break-word;">See my comment, I think osmo_imsi_sanitize() should be used here.</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: 2 </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: Pau Espin Pedrol <pespin@sysmocom.de> </div>
<div style="display:none"> Gerrit-Comment-Date: Mon, 10 Dec 2018 16:08:07 +0000 </div>
<div style="display:none"> Gerrit-HasComments: Yes </div>
<div style="display:none"> Gerrit-HasLabels: Yes </div>