[sr-dev] git:master:c49b50a2: siptrace: safety check for tm callback parameter

iionita ionut-razvan.ionita at 1and1.ro
Tue Apr 23 08:53:33 CEST 2019


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

Author: iionita <ionut-razvan.ionita at 1and1.ro>
Committer: iionita <ionut-razvan.ionita at 1and1.ro>
Date: 2019-04-23T08:25:06+03:00

siptrace: safety check for tm callback parameter

	Found via coverity scan.

---

Modified: src/modules/siptrace/siptrace.c

---

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

---

diff --git a/src/modules/siptrace/siptrace.c b/src/modules/siptrace/siptrace.c
index c34d25d249..e559d7874a 100644
--- a/src/modules/siptrace/siptrace.c
+++ b/src/modules/siptrace/siptrace.c
@@ -1956,6 +1956,12 @@ static void trace_dialog_transaction(struct dlg_cell* dlg, int type, struct dlg_
 		return;
 	}
 
+	/* coverity fix - there shouldn't be a scenario for this to happen */
+	if (params == NULL) {
+		LM_ERR("NULL tm params!\n");
+		return;
+	}
+
 	/**
 	 * DUAL BYE - internally generated BYE from kamailio
 	 * set flag to signal request_in callback which will register




More information about the sr-dev mailing list