Somewhat improve heuristic when SIP is encapsulated in another protocol.
authorjake <jake@f5534014-38df-0310-8fa8-9805f1628bb7>
Wed, 21 Jun 2006 17:57:10 +0000 (17:57 +0000)
committerjake <jake@f5534014-38df-0310-8fa8-9805f1628bb7>
Wed, 21 Jun 2006 17:57:10 +0000 (17:57 +0000)
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@18531 f5534014-38df-0310-8fa8-9805f1628bb7

epan/dissectors/packet-sip.c

index ab12b3a6efcb05612841467ba55c8e0836b0c379..527cc9448f183b0907e2f0c00f40c39860ffa249 100644 (file)
@@ -1216,6 +1216,15 @@ dissect_sip_common(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tr
         */
        orig_offset = offset;
        linelen = tvb_find_line_end(tvb, offset, -1, &next_offset, FALSE);
+       if (tvb_strnlen(tvb, offset, linelen) > -1)
+       {
+               /*
+                * There's a NULL in the line, 
+                * this may be SIP within another protocol.
+                * This heuristic still needs to improve.
+                */
+               return -2;
+       }
        line_type = sip_parse_line(tvb, offset, linelen, &token_1_len);
        if (line_type == OTHER_LINE) {
                /*