[sr-dev] git:master: modules/topoh : If a message contains a bad CSEQ, skip processing it.

Marius Zbihlei marius.zbihlei at 1and1.ro
Fri Nov 26 10:07:27 CET 2010


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

Author: Marius Zbihlei <marius.zbihlei at 1and1.ro>
Committer: Marius Zbihlei <marius.zbihlei at 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;
 




More information about the sr-dev mailing list