aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-bittorrent.c
diff options
context:
space:
mode:
authorgerald <gerald@f5534014-38df-0310-8fa8-9805f1628bb7>2005-08-17 15:04:44 +0000
committergerald <gerald@f5534014-38df-0310-8fa8-9805f1628bb7>2005-08-17 15:04:44 +0000
commit62e33a0491a39b9b196b5bad118c54cd4d61c082 (patch)
treeda32b3c88ea90f93da160b0f74fbed874fecc277 /epan/dissectors/packet-bittorrent.c
parent8769f17dba771c873c2921af32e1ee7192d77627 (diff)
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
Diffstat (limited to 'epan/dissectors/packet-bittorrent.c')
-rw-r--r--epan/dissectors/packet-bittorrent.c4
1 files changed, 2 insertions, 2 deletions
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;
}
}