Browse Source

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.
Marius Zbihlei 15 years ago
parent
commit
29990057d8
1 changed files with 5 additions and 0 deletions
  1. 5 0
      modules/topoh/th_msg.c

+ 5 - 0
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;