<p>George Joseph would like Sean Bright to <strong>review</strong> this change.</p><p><a href="https://gerrit.asterisk.org/c/asterisk/+/15487">View Change</a></p><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;">git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/87/15487/1</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 6004a2f..aed7a89 100644</span><br><span>--- a/res/res_rtp_asterisk.c</span><br><span>+++ b/res/res_rtp_asterisk.c</span><br><span>@@ -6771,7 +6771,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>@@ -6805,7 +6805,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/+/15487">change 15487</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/+/15487"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: certified/16.8 </div>
<div style="display:none"> Gerrit-Change-Id: Ib7aa65644e8df76e2378d7613ee7cf751b9d0bea </div>
<div style="display:none"> Gerrit-Change-Number: 15487 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: George Joseph <gjoseph@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: Sean Bright <sean.bright@gmail.com> </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>