- protection for the case when sanity module checks are not enabled - reported in FS#303 by Michel de Weerd (cherry picked from commit 4f3d04d547c66a1b59398cf80e93974175141514)
@@ -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;