[sr-dev] git:master:125db2c3: Merge pull request #1213 from christoph-v/ims_get_body_coredump

GitHub noreply at github.com
Fri Aug 11 15:54:33 CEST 2017


Module: kamailio
Branch: master
Commit: 125db2c3650843aae2927a4625e3d42a755fa309
URL: https://github.com/kamailio/kamailio/commit/125db2c3650843aae2927a4625e3d42a755fa309

Author: ng-voice GmbH <info at ng-voice.com>
Committer: GitHub <noreply at github.com>
Date: 2017-08-11T15:54:28+02:00

Merge pull request #1213 from christoph-v/ims_get_body_coredump

ims_auth: fixed rare core dump, due to null ptr check

---

Modified: src/modules/ims_auth/utils.c

---

Diff:  https://github.com/kamailio/kamailio/commit/125db2c3650843aae2927a4625e3d42a755fa309.diff
Patch: https://github.com/kamailio/kamailio/commit/125db2c3650843aae2927a4625e3d42a755fa309.patch

---

diff --git a/src/modules/ims_auth/utils.c b/src/modules/ims_auth/utils.c
index 2e40cf8c46..94d02e3fe7 100644
--- a/src/modules/ims_auth/utils.c
+++ b/src/modules/ims_auth/utils.c
@@ -204,7 +204,9 @@ str ims_get_body(struct sip_msg * msg)
 		LM_DBG("Error parsing until header Content-Length: \n");
 		return x;
 	}
-	x.len = (int)(long)msg->content_length->parsed;
+	if (msg->content_length)
+	    // Content-Length header might be missing
+	    x.len = (int)(long)msg->content_length->parsed;
         
         if (x.len>0) 
             x.s = get_body(msg);	




More information about the sr-dev mailing list