Ethereal-dev: Re: [Ethereal-dev] Exception in pdml

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

From: Wesley Shields <wshields@xxxxxxxxx>
Date: Tue, 26 Oct 2004 14:39:59 -0400
Guy Harris wrote:

No, ideally, an invalid value shouldn't *exist*. A field_info structure shouldn't *have* a negative value.

Agreed. I have a jpeg that when viewed through a browser the resulting capture will throw the exception when outputting to pdml. I can provide that jpeg, or the capture, if necessary (it's just a generic green ball used as a bullet in webpages).

There was a bug in the Mobile IPv6 code that caused that to happen; I checked in a fix a couple of days after that message was sent.

I have a change that will cause Ethereal to abort if a dissector attempts to create a field with a negative length or set the length to a negative value, so that bugs of that sort will be caught. I'm testing it now with a collection of captures I have, in order to see whether any dissectors have bugs of that sort; once the testing is done, and any dissectors it finds bugs in are fixed, I'll check that in.

This idea is much better than my patch of checking for negative values when printing the pdml. If a dissector is setting a negative value what should be an appropriate fix? I'd like to know so that the patch I will be writing for this particular dissector will match what you are doing with the rest. Is there any problem with setting the length to 0?

-- WXS