Module: sip-router
Branch: 4.0
Commit: 3ca71bbf4f61c83d8e82c988d0789d147f81f30b
URL:    
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=3ca71bbf4f61c83d8e82c988d0789d147f81f30b

Author: Hugh Waite <[email protected]>
Committer: Hugh Waite <[email protected]>
Date:   Wed Sep 18 21:34:16 2013 +0100

modules/sdpops: Check for valid sdp body in sdp_remove_line_by_prefix

- Fixes crash when used on requests with no body

---

 modules/sdpops/sdpops_mod.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/modules/sdpops/sdpops_mod.c b/modules/sdpops/sdpops_mod.c
index 2d2e668..72ad265 100644
--- a/modules/sdpops/sdpops_mod.c
+++ b/modules/sdpops/sdpops_mod.c
@@ -362,6 +362,11 @@ int sdp_remove_line_by_prefix(sip_msg_t* msg, str* prefix)
                return -1;
        }
 
+       if(msg->body == NULL) {
+               LM_DBG("No sdp body\n");
+               return -1;
+       }
+
        body.s = ((sdp_info_t*)msg->body)->raw_sdp.s;
        body.len = ((sdp_info_t*)msg->body)->raw_sdp.len;
 


_______________________________________________
sr-dev mailing list
[email protected]
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev

Reply via email to