Module: sip-router
Branch: 4.0
Commit: c67ac0b5ef5183947acf02d496eb5899dad0ba9b
URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=c67ac0b…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: Sun Jun 16 17:17:36 2013 +0200
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)
---
modules/topoh/topoh_mod.c | 8 +++++++-
1 files changed, 7 insertions(+), 1 deletions(-)
diff --git a/modules/topoh/topoh_mod.c b/modules/topoh/topoh_mod.c
index 73ebf21..e5e7058 100644
--- a/modules/topoh/topoh_mod.c
+++ b/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;
}