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: Guy Harris <gharris@xxxxxxxxx>
Date: Tue, 26 Oct 2004 10:58:52 -0700
Wesley Shields wrote:

I've done some digging through the archives and can only find minimal mention of this issue. The most specific email[1] I can find that fits this issue is from 3/28/04 (there have been others but they don't specifically mention a negative value). If a field_info struct has a negative length value an exception will eventually be thrown because it can not ensure the block of data is contiguous before printing it out. I believe that throwing an exception is not always desired, as automated processes will stop early. Ideally, an invalid value should be noted and processing should continue.

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

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.