[sr-dev] git:master:93e40d5b: topos: safety checks for couple of mandatory headers

Daniel-Constantin Mierla miconda at gmail.com
Fri Nov 23 08:51:57 CET 2018


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

Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at gmail.com>
Date: 2018-11-23T08:51:18+01:00

topos: safety checks for couple of mandatory headers

- first via and call-id

---

Modified: src/modules/topos/topos_mod.c

---

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

---

diff --git a/src/modules/topos/topos_mod.c b/src/modules/topos/topos_mod.c
index 2cc566c7a4..0e9f16b493 100644
--- a/src/modules/topos/topos_mod.c
+++ b/src/modules/topos/topos_mod.c
@@ -304,6 +304,12 @@ int tps_prepare_msg(sip_msg_t *msg)
 		return 3;
 	}
 
+	if(msg->via1==NULL || msg->callid==NULL) {
+		LM_ERR("mandatory headers missing - via1: %p callid: %p\n",
+				msg->via1, msg->callid);
+		return 4;
+	}
+
 	return 0;
 }
 




More information about the sr-dev mailing list