Module: sip-router Branch: kamailio_3.0 Commit: 29990057d8b17cf0ded395438465c6cb2c38207f URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=29990057...
Author: Marius Zbihlei marius.zbihlei@1and1.ro Committer: Marius Zbihlei marius.zbihlei@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 731d831..b430e25 100644 --- a/modules/topoh/th_msg.c +++ b/modules/topoh/th_msg.c @@ -1033,6 +1033,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;