ANNOUNCEMENT: Live Wireshark University & Allegro Packets online APAC Wireshark Training Session
July 17th, 2024 | 10:00am-11:55am SGT (UTC+8) | Online

Ethereal-dev: Re: [Ethereal-dev] Re: [Ethereal-cvs] rev 13924: /trunk/epan/dissectors/: packet

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

From: Ulf Lamping <ulf.lamping@xxxxxx>
Date: Sun, 27 Mar 2005 13:31:45 +0200
Michael Tuexen wrote:

> Well, I have now a trace file which shows the dissector bug message in
> the
> INFO field...
>
> So how are other protocols handling malformed packets: Raising an
> exception
> or handling it by itself?

Well, if the protocol provides enough information so the dissector can
handle the data in a way (maybe able to continue with next data block or
alike), it could handle it by adding an "invalid data" (or alike) into
the tree.

If the dissector cannot continue, e.g. it don't know where to continue,
it should raise an exception.

We should add a more detailed description how to handle such cases in
the README.developer.


I currently fix some dissectors using tvb_ensure_bytes_exist() from bugs
reported by buildbot randpkt problems. As this might not be the most
elegant solution (performance), this should do the job for now.

Regards, ULFL