From 62e33a0491a39b9b196b5bad118c54cd4d61c082 Mon Sep 17 00:00:00 2001 From: gerald Date: Wed, 17 Aug 2005 15:04:44 +0000 Subject: If we receive junk data from the network it means we have a malformed packet. It doesn't necessarily mean that we have a problem with our dissector. If we see something we didn't expect, throw a ReportedBoundsError instead of calling DISSECTOR_ASSERT() (which makes BuildBot open a ticket). Fixes bugs 362 - 366. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@15390 f5534014-38df-0310-8fa8-9805f1628bb7 --- epan/dissectors/packet-bittorrent.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'epan/dissectors/packet-bittorrent.c') diff --git a/epan/dissectors/packet-bittorrent.c b/epan/dissectors/packet-bittorrent.c index d3021a8832..6c5caccd06 100644 --- a/epan/dissectors/packet-bittorrent.c +++ b/epan/dissectors/packet-bittorrent.c @@ -156,13 +156,13 @@ static guint get_bittorrent_pdu_length(tvbuff_t *tvb, int offset) of this TCP segment as "continuation data"; if this is a real BitTorrent connection, we probably didn't get some data before this segment. */ - DISSECTOR_ASSERT(!"Reassemble error?"); + THROW(ReportedBoundsError); return 0; } } else { /* For now, we just give up, so we don't end up dissecting a message with a bogus length. */ - DISSECTOR_ASSERT(!"Reassemble error?"); + THROW(ReportedBoundsError); return 0; } } -- cgit v1.2.3