浏览代码

tm: check the type of contacts xavp value

- GH #4063
Daniel-Constantin Mierla 9 月之前
父节点
当前提交
3eb9e1d349
共有 1 个文件被更改,包括 5 次插入0 次删除
  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;