<p><a href="https://gerrit.osmocom.org/13608">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/13608/4/ggsn/ggsn.c">File ggsn/ggsn.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/13608/4/ggsn/ggsn.c@531">Patch Set #4, Line 531:</a> <code style="font-family:monospace,monospace">         if (pap_in->len < 1)</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">That's wrong, because len includes header according to line 501. Also, you are accessing data[0] and data[1], so you miss one byte len.</p><p style="white-space: pre-wrap; word-wrap: break-word;">if (pap_in->len < sizeof(*pap_in) + 2)</p></li><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.osmocom.org/#/c/13608/4/ggsn/ggsn.c@535">Patch Set #4, Line 535:</a> <code style="font-family:monospace,monospace">           if (pap_in->len < 1 + peer_id_len)</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">if (pap_in->len < sizeof(*pap_in) + 2 + peer_id_len)</p></li></ul></li></ul><p>To view, visit <a href="https://gerrit.osmocom.org/13608">change 13608</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/13608"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: osmo-ggsn </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-MessageType: comment </div>
<div style="display:none"> Gerrit-Change-Id: I81875f30f9f1497199253497f84718510747f731 </div>
<div style="display:none"> Gerrit-Change-Number: 13608 </div>
<div style="display:none"> Gerrit-PatchSet: 4 </div>
<div style="display:none"> Gerrit-Owner: Harald Welte <laforge@gnumonks.org> </div>
<div style="display:none"> Gerrit-Reviewer: Harald Welte <laforge@gnumonks.org> </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: Fri, 12 Apr 2019 13:16:19 +0000 </div>
<div style="display:none"> Gerrit-HasComments: Yes </div>
<div style="display:none"> Gerrit-HasLabels: No </div>