<p>Joshua Colp <strong>merged</strong> this change.</p><p><a href="https://gerrit.asterisk.org/9373">View Change</a></p><div style="white-space:pre-wrap">Approvals:
Richard Mudgett: Looks good to me, but someone else must approve
Joshua Colp: Looks good to me, approved; Approved for Submit
</div><pre style="font-family: monospace,monospace; white-space: pre-wrap;">res_pjsip_session: sdp group:BUNDLE attribute being truncated<br><br>When setting/appending the media id's to the bundle group attribute a '-1' was<br>being passed to the 'ast_str_set/append' function for the 'max_len' parameter.<br>This essentially capped the length of the string to what it was originally<br>allocated with. In this case 64 bytes.<br><br>This patch makes it so a '0' is passed as in for the 'max_len', which means<br>"no maximum length".<br><br>ASTERISK-27955 #close<br><br>Change-Id: Iec565df6600401d54a502854a53d19bb4cc34876<br>---<br>M res/res_pjsip_session.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_pjsip_session.c b/res/res_pjsip_session.c</span><br><span>index 90198e2..496cf5e 100644</span><br><span>--- a/res/res_pjsip_session.c</span><br><span>+++ b/res/res_pjsip_session.c</span><br><span>@@ -3847,14 +3847,14 @@</span><br><span> continue;</span><br><span> }</span><br><span> </span><br><span style="color: hsl(0, 100%, 40%);">- ast_str_set(&bundle_group->attr_string, -1, "BUNDLE %s", session_media->mid);</span><br><span style="color: hsl(120, 100%, 40%);">+ ast_str_set(&bundle_group->attr_string, 0, "BUNDLE %s", session_media->mid);</span><br><span> continue;</span><br><span> }</span><br><span> </span><br><span> for (mid_id = 1; mid_id < PJMEDIA_MAX_SDP_MEDIA; ++mid_id) {</span><br><span> if (!bundle_group->mids[mid_id]) {</span><br><span> bundle_group->mids[mid_id] = session_media->mid;</span><br><span style="color: hsl(0, 100%, 40%);">- ast_str_append(&bundle_group->attr_string, -1, " %s", session_media->mid);</span><br><span style="color: hsl(120, 100%, 40%);">+ ast_str_append(&bundle_group->attr_string, 0, " %s", session_media->mid);</span><br><span> break;</span><br><span> } else if (!strcmp(bundle_group->mids[mid_id], session_media->mid)) {</span><br><span> break;</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.asterisk.org/9373">change 9373</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/9373"/><meta itemprop="name" content="View Change"/></div></div>
<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: 15 </div>
<div style="display:none"> Gerrit-MessageType: merged </div>
<div style="display:none"> Gerrit-Change-Id: Iec565df6600401d54a502854a53d19bb4cc34876 </div>
<div style="display:none"> Gerrit-Change-Number: 9373 </div>
<div style="display:none"> Gerrit-PatchSet: 2 </div>
<div style="display:none"> Gerrit-Owner: Kevin Harwell <kharwell@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: Jenkins2 </div>
<div style="display:none"> Gerrit-Reviewer: Joshua Colp <jcolp@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: Richard Mudgett <rmudgett@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: Sean Bright <sean.bright@gmail.com> </div>