<p>Friendly Automation <strong>submitted</strong> this change.</p><p><a href="https://gerrit.asterisk.org/c/asterisk/+/14014">View Change</a></p><div style="white-space:pre-wrap">Approvals:
Joshua Colp: Looks good to me, approved
Kevin Harwell: Looks good to me, but someone else must approve
George Joseph: Looks good to me, but someone else must approve
Pascal Cadotte Michaud: Looks good to me, but someone else must approve
Friendly Automation: Approved for Submit
</div><pre style="font-family: monospace,monospace; white-space: pre-wrap;">res_rtp_asterisk: Ensure sufficient space for worst case NACK.<br><br>ASTERISK-28790<br><br>Change-Id: I10df52f98b19ed62575f25dab36e82d136dccd99<br>---<br>M res/res_rtp_asterisk.c<br>1 file changed, 4 insertions(+), 1 deletion(-)<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 4f736ef..a5b7106 100644</span><br><span>--- a/res/res_rtp_asterisk.c</span><br><span>+++ b/res/res_rtp_asterisk.c</span><br><span>@@ -7916,12 +7916,15 @@</span><br><span> int res = 0;</span><br><span> int ice;</span><br><span> int sr;</span><br><span style="color: hsl(0, 100%, 40%);">- size_t data_size = AST_UUID_STR_LEN + 128 + (seqno - rtp->expectedrxseqno) / 17;</span><br><span style="color: hsl(120, 100%, 40%);">+ size_t data_size = AST_UUID_STR_LEN + 128 + (AST_VECTOR_SIZE(&rtp->missing_seqno) * 4);</span><br><span> RAII_VAR(unsigned char *, rtcpheader, NULL, ast_free_ptr);</span><br><span> RAII_VAR(struct ast_rtp_rtcp_report *, rtcp_report,</span><br><span> ast_rtp_rtcp_report_alloc(rtp->themssrc_valid ? 1 : 0),</span><br><span> ao2_cleanup);</span><br><span> </span><br><span style="color: hsl(120, 100%, 40%);">+ /* Sufficient space for RTCP headers and report, SDES with CNAME, NACK header,</span><br><span style="color: hsl(120, 100%, 40%);">+ * and worst case 4 bytes per missing sequence number.</span><br><span style="color: hsl(120, 100%, 40%);">+ */</span><br><span> rtcpheader = ast_malloc(sizeof(*rtcpheader) + data_size);</span><br><span> if (!rtcpheader) {</span><br><span> ast_debug(1, "Failed to allocate memory for NACK\n");</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.asterisk.org/c/asterisk/+/14014">change 14014</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/+/14014"/><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: I10df52f98b19ed62575f25dab36e82d136dccd99 </div>
<div style="display:none"> Gerrit-Change-Number: 14014 </div>
<div style="display:none"> Gerrit-PatchSet: 2 </div>
<div style="display:none"> Gerrit-Owner: Joshua Colp <jcolp@sangoma.com> </div>
<div style="display:none"> Gerrit-Reviewer: Friendly Automation </div>
<div style="display:none"> Gerrit-Reviewer: George Joseph <gjoseph@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: Joshua Colp <jcolp@sangoma.com> </div>
<div style="display:none"> Gerrit-Reviewer: Kevin Harwell <kharwell@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: Pascal Cadotte Michaud <pcm@wazo.io> </div>
<div style="display:none"> Gerrit-MessageType: merged </div>