Browse code

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 authored on 26/11/2010 08:59:12
Showing 1 changed files
... ...
@@ -1033,6 +1033,11 @@ int th_route_direction(sip_msg_t *msg)
1033 1033
 
1034 1034
 int th_skip_msg(sip_msg_t *msg)
1035 1035
 {
1036
+	if (!get_cseq(msg)) {
1037
+		LM_WARN("Invalid/Unparsed CSeq in message. Skipping.");
1038
+		return 1;
1039
+	}
1040
+
1036 1041
 	if((get_cseq(msg)->method_id)&(METHOD_REGISTER|METHOD_PUBLISH))
1037 1042
 		return 1;
1038 1043