[sr-dev] git:master:372993c8: tm: t_serial - safety check for searched xavps

Daniel-Constantin Mierla miconda at gmail.com
Mon Nov 19 09:25:26 CET 2018


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

Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at gmail.com>
Date: 2018-11-19T09:24:39+01:00

tm: t_serial - safety check for searched xavps

---

Modified: src/modules/tm/t_serial.c

---

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

---

diff --git a/src/modules/tm/t_serial.c b/src/modules/tm/t_serial.c
index 8f8ee0646d..68b8afc1c3 100644
--- a/src/modules/tm/t_serial.c
+++ b/src/modules/tm/t_serial.c
@@ -599,10 +599,18 @@ int ki_t_next_contacts(struct sip_msg* msg)
 		xavp_rm(prev_xavp, NULL);
 
 		vavp = xavp_get(&q_flag_name, xavp->val.v.xavp);
-		q_flag = vavp->val.v.i;
+		if(vavp) {
+			q_flag = vavp->val.v.i;
+		} else {
+			q_flag = 0;
+		}
 
 		vavp = xavp_get(&uri_name, xavp->val.v.xavp);
-		uri = vavp->val.v.s;
+		if(vavp) {
+			uri = vavp->val.v.s;
+		} else {
+			uri.len = 0;
+		}
 
 		vavp = xavp_get(&dst_uri_name, xavp->val.v.xavp);
 		if (vavp != NULL) {




More information about the sr-dev mailing list