Module: sip-router
Branch: master
Commit: 4f3d04d547c66a1b59398cf80e93974175141514
URL:    
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=4f3d04d547c66a1b59398cf80e93974175141514

Author: Daniel-Constantin Mierla <mico...@gmail.com>
Committer: Daniel-Constantin Mierla <mico...@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

---

 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;
 }
 


_______________________________________________
sr-dev mailing list
sr-dev@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev

Reply via email to