<p>George Joseph <strong>merged</strong> this change.</p><p><a href="https://gerrit.asterisk.org/7586">View Change</a></p><div style="white-space:pre-wrap">Approvals:
Joshua Colp: Looks good to me, but someone else must approve
Benjamin Keith Ford: Looks good to me, but someone else must approve
George Joseph: Looks good to me, approved; Approved for Submit
</div><pre style="font-family: monospace,monospace; white-space: pre-wrap;">res_pjsip_sdp_rtp: Add NULL check in add_crypto_to_stream<br><br>add_crypto_to_stream wasn't checking for a NULL<br>session->inv_session->neg before calling pjmedia_sdp_neg_get_state.<br>This was causing a crash if the negotiation hadn't already been<br>completed and asterisk was compiled with --enable-dev-mode.<br><br>Change-Id: I57c6229954a38145da9810fc18657bfcc4d9d0c9<br>---<br>M res/res_pjsip_sdp_rtp.c<br>1 file changed, 2 insertions(+), 1 deletion(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">diff --git a/res/res_pjsip_sdp_rtp.c b/res/res_pjsip_sdp_rtp.c<br>index a877582..854ed14 100644<br>--- a/res/res_pjsip_sdp_rtp.c<br>+++ b/res/res_pjsip_sdp_rtp.c<br>@@ -1253,7 +1253,8 @@<br> /* If this is an answer we need to use our current state, if it's an offer we need to use<br> * the configured value.<br> */<br>- if (pjmedia_sdp_neg_get_state(session->inv_session->neg) != PJMEDIA_SDP_NEG_STATE_DONE) {<br>+ if (session->inv_session->neg<br>+ && pjmedia_sdp_neg_get_state(session->inv_session->neg) != PJMEDIA_SDP_NEG_STATE_DONE) {<br> setup = dtls->get_setup(session_media->rtp);<br> } else {<br> setup = session->endpoint->media.rtp.dtls_cfg.default_setup;<br></pre><p>To view, visit <a href="https://gerrit.asterisk.org/7586">change 7586</a>. To unsubscribe, 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/7586"/><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: I57c6229954a38145da9810fc18657bfcc4d9d0c9 </div>
<div style="display:none"> Gerrit-Change-Number: 7586 </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: Benjamin Keith Ford <bford@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: George Joseph <gjoseph@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: Joshua Colp <jcolp@digium.com> </div>