From b7c3d6c14a9f9f0272edd614bf09dbfebbc9d595 Mon Sep 17 00:00:00 2001 From: Michael Jerris Date: Sun, 25 May 2008 15:06:27 +0000 Subject: [PATCH] Tue May 20 09:35:46 EDT 2008 Pekka.Pessi@nokia.com * soa_static.c: fixed klocwork issues git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@8618 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- libs/sofia-sip/.update | 2 +- libs/sofia-sip/libsofia-sip-ua/soa/soa_static.c | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/libs/sofia-sip/.update b/libs/sofia-sip/.update index c6caaff909..699342f78c 100644 --- a/libs/sofia-sip/.update +++ b/libs/sofia-sip/.update @@ -1 +1 @@ -Sun May 25 11:05:03 EDT 2008 +Sun May 25 11:06:22 EDT 2008 diff --git a/libs/sofia-sip/libsofia-sip-ua/soa/soa_static.c b/libs/sofia-sip/libsofia-sip-ua/soa/soa_static.c index bee4f4b949..b73cfd52fa 100644 --- a/libs/sofia-sip/libsofia-sip-ua/soa/soa_static.c +++ b/libs/sofia-sip/libsofia-sip-ua/soa/soa_static.c @@ -1117,6 +1117,8 @@ static int offer_answer_step(soa_session_t *ss, if (action == generate_offer) remote = NULL; + else if (remote == NULL) + return soa_set_status(ss, 500, "No remote SDP"); /* Pre-negotiation Step: Expand truncated remote SDP */ if (local && remote) switch (action) { @@ -1127,6 +1129,8 @@ static int offer_answer_step(soa_session_t *ss, SU_DEBUG_5(("%s: remote %s is truncated: expanding\n", by, action == generate_answer ? "offer" : "answer")); remote = soa_sdp_expand_media(tmphome, remote, local); + if (remote == NULL) + return soa_set_status(ss, 500, "Cannot expand remote session"); } default: break;