Browse Source

tm: check the type of contacts xavp value

- GH #4063
Daniel-Constantin Mierla 9 months ago
parent
commit
3eb9e1d349
1 changed files with 5 additions and 0 deletions
  1. 5 0
      src/modules/tm/t_serial.c

+ 5 - 0
src/modules/tm/t_serial.c

@@ -643,6 +643,11 @@ int ki_t_next_contacts(struct sip_msg *msg)
 		LM_DBG("no contacts in contacts_avp - we are done!\n");
 		return -2;
 	}
+	if(xavp_list->val.type != SR_XTYPE_XAVP) {
+		LM_ERR("invalid value type (%d) for contacts xavp\n",
+				xavp_list->val.type);
+		return -3;
+	}
 
 	xavp = xavp_list;