<p>George Joseph <strong>submitted</strong> this change.</p><p><a href="https://gerrit.asterisk.org/c/asterisk/+/15486">View Change</a></p><div style="white-space:pre-wrap">Approvals:
George Joseph: Looks good to me, approved; Approved for Submit
</div><pre style="font-family: monospace,monospace; white-space: pre-wrap;">res_rtp_asterisk.c: Fix signed mismatch that leads to overflow<br><br>ASTERISK-29205 #close<br><br>Change-Id: Ib7aa65644e8df76e2378d7613ee7cf751b9d0bea<br>---<br>M res/res_rtp_asterisk.c<br>1 file changed, 2 insertions(+), 2 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/res/res_rtp_asterisk.c b/res/res_rtp_asterisk.c</span><br><span>index dfec8f5..29ffffc 100644</span><br><span>--- a/res/res_rtp_asterisk.c</span><br><span>+++ b/res/res_rtp_asterisk.c</span><br><span>@@ -6932,7 +6932,7 @@</span><br><span> /* If there is no more room left for storing packets stop now, we leave 20</span><br><span> * extra bits at the end just in case.</span><br><span> */</span><br><span style="color: hsl(0, 100%, 40%);">- if ((sizeof(bdata) - (packet_len + delta_len + 20)) < 0) {</span><br><span style="color: hsl(120, 100%, 40%);">+ if (packet_len + delta_len + 20 > sizeof(bdata)) {</span><br><span> res = -1;</span><br><span> break;</span><br><span> }</span><br><span>@@ -6966,7 +6966,7 @@</span><br><span> previous_packet = statistics;</span><br><span> </span><br><span> /* If there is no more room left in the packet stop handling of any subsequent packets */</span><br><span style="color: hsl(0, 100%, 40%);">- if ((sizeof(bdata) - (packet_len + delta_len + 20)) < 0) {</span><br><span style="color: hsl(120, 100%, 40%);">+ if (packet_len + delta_len + 20 > sizeof(bdata)) {</span><br><span> break;</span><br><span> }</span><br><span> }</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.asterisk.org/c/asterisk/+/15486">change 15486</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://gerrit.asterisk.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.asterisk.org/c/asterisk/+/15486"/><meta itemprop="name" content="View Change"/></div></div>
<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: 18 </div>
<div style="display:none"> Gerrit-Change-Id: Ib7aa65644e8df76e2378d7613ee7cf751b9d0bea </div>
<div style="display:none"> Gerrit-Change-Number: 15486 </div>
<div style="display:none"> Gerrit-PatchSet: 2 </div>
<div style="display:none"> Gerrit-Owner: George Joseph <gjoseph@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: George Joseph <gjoseph@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: Sean Bright <sean.bright@gmail.com> </div>
<div style="display:none"> Gerrit-CC: Friendly Automation </div>
<div style="display:none"> Gerrit-MessageType: merged </div>