From dfb09253b1cde4b27d80adef5ec56903585631b4 Mon Sep 17 00:00:00 2001 From: jake Date: Wed, 21 Jun 2006 17:57:10 +0000 Subject: [PATCH] Somewhat improve heuristic when SIP is encapsulated in another protocol. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@18531 f5534014-38df-0310-8fa8-9805f1628bb7 --- epan/dissectors/packet-sip.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/epan/dissectors/packet-sip.c b/epan/dissectors/packet-sip.c index ab12b3a6ef..527cc9448f 100644 --- a/epan/dissectors/packet-sip.c +++ b/epan/dissectors/packet-sip.c @@ -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) { /* -- 2.34.1