diff options
author | Guy Harris <guy@alum.mit.edu> | 2000-11-19 21:01:06 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2000-11-19 21:01:06 +0000 |
commit | 8fa7f53b1f74275c5c01ea60eb4d4bba97cd8490 (patch) | |
tree | 4ccf5dc110b7f31a01e6acc77454ef0446c68a57 | |
parent | 6cbf7512cb29222070225229866952a1accf74bd (diff) | |
download | wireshark-8fa7f53b1f74275c5c01ea60eb4d4bba97cd8490.tar.gz wireshark-8fa7f53b1f74275c5c01ea60eb4d4bba97cd8490.tar.bz2 wireshark-8fa7f53b1f74275c5c01ea60eb4d4bba97cd8490.zip |
Fixes, from Heikki Vatiainen, to bugs introduced by the tvbuffification
of the SAP and SDP dissectors.
svn path=/trunk/; revision=2676
-rw-r--r-- | packet-sap.c | 12 | ||||
-rw-r--r-- | packet-sdp.c | 3 |
2 files changed, 9 insertions, 6 deletions
diff --git a/packet-sap.c b/packet-sap.c index 758c319259..a10ba06342 100644 --- a/packet-sap.c +++ b/packet-sap.c @@ -4,7 +4,7 @@ * * Heikki Vatiainen <hessu@cs.tut.fi> * - * $Id: packet-sap.c,v 1.15 2000/11/19 08:54:05 guy Exp $ + * $Id: packet-sap.c,v 1.16 2000/11/19 21:01:06 guy Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@zing.org> @@ -137,6 +137,7 @@ dissect_sap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) guint16 tmp1; guint8 *addr; guint8 auth_flags; + tvbuff_t *next_tvb; proto_item *si, *sif; proto_tree *sap_tree, *sap_flags_tree; @@ -239,7 +240,7 @@ dissect_sap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) } /* Do we have the optional payload type aka. MIME content specifier */ - if (!tvb_strneql(tvb, offset, "v=", strlen("v="))) { + if (tvb_strneql(tvb, offset, "v=", strlen("v="))) { gint remaining_len; guint32 pt_len; int pt_string_len; @@ -276,11 +277,12 @@ dissect_sap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) tvb_get_ptr(tvb, offset, pt_string_len)); offset += pt_len; } - - /* Done with SAP */ - call_dissector(sdp_handle, tvb, pinfo, tree); } + /* Done with SAP */ + next_tvb = tvb_new_subset(tvb, offset, -1, -1); + call_dissector(sdp_handle, next_tvb, pinfo, tree); + return; } diff --git a/packet-sdp.c b/packet-sdp.c index 1c0a639547..12b613eab6 100644 --- a/packet-sdp.c +++ b/packet-sdp.c @@ -4,7 +4,7 @@ * Jason Lango <jal@netapp.com> * Liberally copied from packet-http.c, by Guy Harris <guy@alum.mit.edu> * - * $Id: packet-sdp.c,v 1.16 2000/11/15 07:07:44 guy Exp $ + * $Id: packet-sdp.c,v 1.17 2000/11/19 21:01:06 guy Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@zing.org> @@ -118,6 +118,7 @@ dissect_sdp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) next_offset - offset, "Invalid line: %s", tvb_format_text(tvb, offset, next_offset - offset)); + offset = next_offset; continue; } value = line + 2; |