<p>George Joseph has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.asterisk.org/7585">View Change</a></p><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;">git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/85/7585/1</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/7585">change 7585</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/7585"/><meta itemprop="name" content="View Change"/></div></div>
<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>
<div style="display:none"> Gerrit-Change-Id: I57c6229954a38145da9810fc18657bfcc4d9d0c9 </div>
<div style="display:none"> Gerrit-Change-Number: 7585 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: George Joseph <gjoseph@digium.com> </div>