From 31cf9bfadb7e0316539146eca67ee9bf9eb603f0 Mon Sep 17 00:00:00 2001 From: Guy Harris Date: Thu, 1 Jan 2004 21:47:18 +0000 Subject: Don't show empty media formats. svn path=/trunk/; revision=9514 --- packet-sdp.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'packet-sdp.c') diff --git a/packet-sdp.c b/packet-sdp.c index 0fb1d3bd97..0a8ef39d95 100644 --- a/packet-sdp.c +++ b/packet-sdp.c @@ -4,7 +4,7 @@ * Jason Lango * Liberally copied from packet-http.c, by Guy Harris * - * $Id: packet-sdp.c,v 1.40 2003/12/31 09:47:01 guy Exp $ + * $Id: packet-sdp.c,v 1.41 2004/01/01 21:47:18 guy Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs @@ -822,7 +822,9 @@ dissect_sdp_media(tvbuff_t *tvb, proto_item *ti, next_offset = tvb_find_guint8(tvb,offset,-1,' '); if(next_offset == -1){ - tokenlen = -1; /* End of tvbuff */ + tokenlen = tvb_length_remaining(tvb, offset); /* End of tvbuff */ + if (tokenlen == 0) + break; /* Nothing more left */ } else { tokenlen = next_offset - offset; } -- cgit v1.2.3