[sr-dev] git:master:313fc935: siptrace: safety check for msg pointer in trace_transaction()

Daniel-Constantin Mierla miconda at gmail.com
Wed Apr 17 15:19:14 CEST 2019


Module: kamailio
Branch: master
Commit: 313fc93529cb61dbf1e7c173dd2e4fa6ffc4af70
URL: https://github.com/kamailio/kamailio/commit/313fc93529cb61dbf1e7c173dd2e4fa6ffc4af70

Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at gmail.com>
Date: 2019-04-17T15:08:46+02:00

siptrace: safety check for msg pointer in trace_transaction()

---

Modified: src/modules/siptrace/siptrace.c

---

Diff:  https://github.com/kamailio/kamailio/commit/313fc93529cb61dbf1e7c173dd2e4fa6ffc4af70.diff
Patch: https://github.com/kamailio/kamailio/commit/313fc93529cb61dbf1e7c173dd2e4fa6ffc4af70.patch

---

diff --git a/src/modules/siptrace/siptrace.c b/src/modules/siptrace/siptrace.c
index 7bfa5a60ee..e3ddfeda76 100644
--- a/src/modules/siptrace/siptrace.c
+++ b/src/modules/siptrace/siptrace.c
@@ -1844,6 +1844,11 @@ static void trace_sl_onreply_out(sl_cbp_t *slcbp)
 
 static void trace_transaction(sip_msg_t* msg, siptrace_info_t* info)
 {
+	if(msg == NULL) {
+		LM_DBG("nothing to trace\n");
+		return;
+	}
+
 	/* trace current message on out */
 	msg->msg_flags |= FL_SIPTRACE;
 	if (info->uriState == STRACE_RAW_URI) {




More information about the sr-dev mailing list