Wireshark-dev: [Wireshark-dev] assertion for malformed packets?
From: Jeff Morriss <jeff.morriss@xxxxxxxxxxx>
Date: Mon, 16 Apr 2007 17:09:49 +0800

Hi list,

Bug 1511 replaced a g_assert() by a DISSECTOR_ASSERT() to avoid exiting on a bad packet, but that will show up as a "dissector bug" when really the problem is in the packet.

Any objections to, say, DISSECTOR_ASSERT_MALFORMED_PACKET which would throw a BoundsError for use in this kind of situations? (No, it's not really a bounds error but the effect is the desired one: the user gets shown "malformed packet".) I have, in the past, also wanted a simple assertion like that when a dissector finds illogical stuff in the packet.

-J