<p><a href="https://gerrit.osmocom.org/c/osmo-hlr/+/16846">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/osmo-hlr/+/16846/1/src/mslookup/mdns_rfc.c">File src/mslookup/mdns_rfc.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/osmo-hlr/+/16846/1/src/mslookup/mdns_rfc.c@106">Patch Set #1, Line 106:</a> <code style="font-family:monospace,monospace">               memcpy(buf + i, qname + 1, len);</code></p><p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;">Shouldn't a check be placed here?</blockquote></p><p style="white-space: pre-wrap; word-wrap: break-word;">There are checks above, which make sure that this is safe:</p><p style="white-space: pre-wrap; word-wrap: break-word;">"buf + i" and len:</p><ul><li>the address that buf points to does not change in the loop</li><li>buf has size OSMO_MDNS_RFC_MAX_NAME_LEN + 1 (line 79)</li><li>check in line 94 makes sure, that buf + i + len does not write outside of buf's size</li></ul><p style="white-space: pre-wrap; word-wrap: break-word;">"qname + 1" and len:</p><ul><li>line 92: next_label = qname + len + 1;</li><li>line 94: if (next_label >= qname_end || ...) return NULL;</li></ul></li></ul></li></ul><p>To view, visit <a href="https://gerrit.osmocom.org/c/osmo-hlr/+/16846">change 16846</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/c/osmo-hlr/+/16846"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: osmo-hlr </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-Change-Id: Ifa269d8a88d84c01349668cdd8d1f1d24c12c6d8 </div>
<div style="display:none"> Gerrit-Change-Number: 16846 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: osmith <osmith@sysmocom.de> </div>
<div style="display:none"> Gerrit-Reviewer: Jenkins Builder </div>
<div style="display:none"> Gerrit-Reviewer: osmith <osmith@sysmocom.de> </div>
<div style="display:none"> Gerrit-CC: pespin <pespin@sysmocom.de> </div>
<div style="display:none"> Gerrit-Comment-Date: Tue, 14 Jan 2020 07:55:50 +0000 </div>
<div style="display:none"> Gerrit-HasComments: Yes </div>
<div style="display:none"> Gerrit-Has-Labels: No </div>
<div style="display:none"> Comment-In-Reply-To: pespin <pespin@sysmocom.de> </div>
<div style="display:none"> Gerrit-MessageType: comment </div>