Ethereal-dev: Re: [Ethereal-dev] Reaction of g_assert maybe too hard for buggy dissectors?

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

From: Guy Harris <gharris@xxxxxxxxx>
Date: Sat, 15 Jan 2005 20:35:35 -0800
Ulf Lamping wrote:

This comes to the following: why don't we check for such things and fire an exception, so a [Malformed packet] will be displayed.

Because the packet might not be malformed; it might just be that the *dissector* is malformed.

Insead, the checks (which should be done in *all* versions, even production versions) should probably throw a new exception, which

1) causes something such as "[Dissector bug]", perhaps with an assertion string containing the file/line and assertion expression, as well as the protocol name, so we know what protocol was being dissected;

2) call "report_failure()", so that a dialog box is popped up in Ethereal and a message is printed in Tethereal, so that the user knows that there's something wrong and is thus more likely to tell us about it.