Module: sip-router
Branch: master
Commit: 50453970817aa4ed551d7ab2b351b3742c839848
URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=5045397…
Author: Marius Zbihlei <marius.zbihlei(a)1and1.ro>
Committer: Marius Zbihlei <marius.zbihlei(a)1and1.ro>
Date: Fri Nov 26 10:59:12 2010 +0200
modules/topoh : If a message contains a bad CSEQ, skip processing it.
This would likely cause a segmentation fault when receiving messages with bad CSEQs.
---
modules/topoh/th_msg.c | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/modules/topoh/th_msg.c b/modules/topoh/th_msg.c
index 5304b1e..5f87971 100644
--- a/modules/topoh/th_msg.c
+++ b/modules/topoh/th_msg.c
@@ -1040,6 +1040,11 @@ int th_route_direction(sip_msg_t *msg)
int th_skip_msg(sip_msg_t *msg)
{
+ if (!get_cseq(msg)) {
+ LM_WARN("Invalid/Unparsed CSeq in message. Skipping.");
+ return 1;
+ }
+
if((get_cseq(msg)->method_id)&(METHOD_REGISTER|METHOD_PUBLISH))
return 1;