浏览代码

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 年之前
父节点
当前提交
5045397081
共有 1 个文件被更改,包括 5 次插入0 次删除
  1. 5 0
      modules/topoh/th_msg.c

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