Hi List!
The recent problems coming up with buggy dissectors crashing when a
dissector reports a bogus length field made me think about that kind of
reaction in general.
Typically, an assert will only take effect in debug versions, release
versions should generate no code for it so nothing happens here.
So we see some dissectors have problems with reporting such a length,
and a g_assert will trigger, crashing ethereal. BTW: This makes Ethereal
a target for a denial of service attack from the outside :-(
Beside the effect that a g_assert should trigger an already running
debugger instead of simply showing some dialogs (but that's a bug in the
win32 version of GTK IMHO).
Of course, a better way would be to debug the code and remove the bug
behind the problem, but IMHO we will never get an error free dissection
as there is just too much code.
This comes to the following: why don't we check for such things and fire
an exception, so a [Malformed packet] will be displayed.
Doing it that way will slightly slow down dissection, as some checks
have to be added that should not be part of a release version.
If others do agree, we have to identify the frequently triggered
g_assert's and replace them with firing exceptions.
What do other's think of this?
Regards, ULFL