فهرست منبع

topoh: safety check for To header

- protection for the case when sanity module checks are not enabled
- reported in FS#303 by Michel de Weerd

(cherry picked from commit 4f3d04d547c66a1b59398cf80e93974175141514)
Daniel-Constantin Mierla 12 سال پیش
والد
کامیت
c67ac0b5ef
1فایلهای تغییر یافته به همراه7 افزوده شده و 1 حذف شده
  1. 7 1
      modules/topoh/topoh_mod.c

+ 7 - 1
modules/topoh/topoh_mod.c

@@ -227,7 +227,13 @@ int th_prepare_msg(sip_msg_t *msg)
 		LM_ERR("cannot parse FROM header\n");
 		return 3;
 	}
-	
+
+	if(get_to(msg)==NULL)
+	{
+		LM_ERR("cannot parse TO header\n");
+		return 3;
+	}
+
 	return 0;
 }