Bläddra i källkod

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 år sedan
förälder
incheckning
c67ac0b5ef
1 ändrade filer med 7 tillägg och 1 borttagningar
  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;
 }