Explorar o código

Merge pull request #334 from zxcpoiu/master

tmx: safety check for bad callid header in t_precheck_tran()
Daniel-Constantin Mierla %!s(int64=10) %!d(string=hai) anos
pai
achega
f6270fcc19
Modificáronse 1 ficheiros con 4 adicións e 0 borrados
  1. 4 0
      modules/tmx/tmx_pretran.c

+ 4 - 0
modules/tmx/tmx_pretran.c

@@ -227,6 +227,10 @@ int tmx_check_pretran(sip_msg_t *msg)
 		LM_ERR("failed to get From header\n");
 		return -1;
 	}
+	if (msg->callid==NULL || msg->callid->body.s==NULL) {
+		LM_ERR("failed to parse callid headers\n");
+		return -1;
+	}
 
 	vbr = msg->via1->branch;