<p style="white-space: pre-wrap; word-wrap: break-word;">I think you have lots of duplicates for same check (len < sizeof(struct rtp_hdr)) all around, some them being hit by same packet. That's because these checks are at the end of code paths, while they should be in previous more generic paths (like when receiving an rtp packet), and have it only there. Specially since most functions containing the checks are static which means are called by same parent functions...</p><p><a href="https://gerrit.osmocom.org/c/osmo-mgw/+/15242">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/15242/3/src/libosmo-mgcp/mgcp_network.c">File src/libosmo-mgcp/mgcp_network.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/15242/3/src/libosmo-mgcp/mgcp_network.c@511">Patch Set #3, Line 511:</a> <code style="font-family:monospace,monospace">                return;</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">This one shoudl return -EINVAL too.</p></li></ul></li></ul><p>To view, visit <a href="https://gerrit.osmocom.org/c/osmo-mgw/+/15242">change 15242</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-mgw/+/15242"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: osmo-mgw </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-Change-Id: I6bc6ee950ce07bcc2c585c30fad02b81153bdde2 </div>
<div style="display:none"> Gerrit-Change-Number: 15242 </div>
<div style="display:none"> Gerrit-PatchSet: 3 </div>
<div style="display:none"> Gerrit-Owner: neels <nhofmeyr@sysmocom.de> </div>
<div style="display:none"> Gerrit-Reviewer: Jenkins Builder </div>
<div style="display:none"> Gerrit-Reviewer: neels <nhofmeyr@sysmocom.de> </div>
<div style="display:none"> Gerrit-Reviewer: pespin <pespin@sysmocom.de> </div>
<div style="display:none"> Gerrit-Comment-Date: Thu, 22 Aug 2019 10:35:38 +0000 </div>
<div style="display:none"> Gerrit-HasComments: Yes </div>
<div style="display:none"> Gerrit-Has-Labels: No </div>
<div style="display:none"> Gerrit-MessageType: comment </div>