Module: sip-router
Branch: 3.1
Commit: a72e59d23d4b104af6d7f30d1dc02a5fe175f3af
URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=a72e59d…
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.
(cherry picked from commit 29990057d8b17cf0ded395438465c6cb2c38207f)
---
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;