<p>Benjamin Keith Ford <strong>submitted</strong> this change.</p><p><a href="https://gerrit.asterisk.org/c/asterisk/+/13276">View Change</a></p><div style="white-space:pre-wrap">Approvals:
  Benjamin Keith Ford: Looks good to me, approved; Approved for Submit

</div><pre style="font-family: monospace,monospace; white-space: pre-wrap;">res_pjsip_session.c: Check for port of zero on incoming SDP.<br><br>If a re-invite comes in initiating T.38, but there is no c line in the<br>SDP and the port is also 0, a crash can occur. A check is now done on<br>the port to see if the steam is already declined, preventing the crash.<br>The logic was moved to res_pjsip_session.c because it is handled in a<br>similar manner in later versions of Asterisk.<br><br>ASTERISK-28612<br>Reported by: Salah Ahmed<br><br>Change-Id: Ifc4a0d05b32c7f2156e77fc8435a6ecaa6abada0<br>---<br>M res/res_pjsip_session.c<br>1 file changed, 7 insertions(+), 0 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 26e5c39..8e1eb21 100644</span><br><span>--- a/res/res_pjsip_session.c</span><br><span>+++ b/res/res_pjsip_session.c</span><br><span>@@ -235,6 +235,13 @@</span><br><span>                   continue;</span><br><span>            }</span><br><span> </span><br><span style="color: hsl(120, 100%, 40%);">+         /* If we have a port of 0, ignore this stream */</span><br><span style="color: hsl(120, 100%, 40%);">+              if (!sdp->media[i]->desc.port) {</span><br><span style="color: hsl(120, 100%, 40%);">+                        ast_debug(1, "Declining incoming SDP media stream '%s' at position '%d'\n",</span><br><span style="color: hsl(120, 100%, 40%);">+                         session_media->stream_type, i);</span><br><span style="color: hsl(120, 100%, 40%);">+                    continue;</span><br><span style="color: hsl(120, 100%, 40%);">+             }</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span>          if (session_media->handler) {</span><br><span>                     handler = session_media->handler;</span><br><span>                         ast_debug(1, "Negotiating incoming SDP media stream '%s' using %s SDP handler\n",</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.asterisk.org/c/asterisk/+/13276">change 13276</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/+/13276"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: certified/13.21 </div>
<div style="display:none"> Gerrit-Change-Id: Ifc4a0d05b32c7f2156e77fc8435a6ecaa6abada0 </div>
<div style="display:none"> Gerrit-Change-Number: 13276 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Benjamin Keith Ford <bford@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: Benjamin Keith Ford <bford@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: Friendly Automation </div>
<div style="display:none"> Gerrit-MessageType: merged </div>