Huge thanks to our Platinum Members Endace and LiveAction,
and our Silver Member Veeam, for supporting the Wireshark Foundation and project.

Wireshark-dev: Re: [Wireshark-dev] How to handle Ethernet frames with FCS, malformed packet in

From: Guy Harris <guy@xxxxxxxxxxxx>
Date: Mon, 26 Sep 2011 14:52:27 -0700
On Sep 26, 2011, at 2:00 PM, Stephen Fisher wrote:

> tvb_len had two possible ways of being set, either directly from 
> tvb_length(tvb) or tvb_length(tvb) minus some various values:

Both of which were wrong.  It's really the PDU length, and should be set from tvb_reported_length().  I've checked in a change to do that (and renamed it to pdu_len, to make it clearer what it's supposed to be).

The code that deals with stuff at the end should perhaps be cleaned up so that it only does that stuff if it's actually in the captured data, so it doesn't throw an exception before dissecting the stuff before it in the packet, and puts it into the protocol tree only after dissecting the rest of the packet (so that it can at least throw the exception there).