2
0
Эх сурвалжийг харах

topoh: safety check for Via header when removed from script

- reported by Guillaume Bour, FS#300
Daniel-Constantin Mierla 12 жил өмнө
parent
commit
b480ac5550

+ 5 - 0
modules/topoh/th_msg.c

@@ -967,6 +967,11 @@ int th_del_via_cookie(sip_msg_t *msg, struct via_body *via)
 {
 	struct via_param *p;
 	struct lump* l;
+
+	if(via==NULL) {
+		LM_DBG("no via header\n");
+		return 0;
+	}
 	for(p=via->param_lst; p; p=p->next)
 	{
 		if(p->name.len==th_cookie_name.len