Ethereal-dev: Re: [Ethereal-dev] Potential crash in NDPS dissector.

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

From: Guy Harris <guy@xxxxxxxxxxxx>
Date: Fri, 17 Oct 2003 16:00:08 -0700
On Fri, Oct 17, 2003 at 03:44:05PM -0600, Greg Morris wrote:
> Attached is a diff to fix a potential crash in the NDPS dissector. I had
> to add checks for length of 0 when calling proto_tree_add_item with
> length from packet trace. If length was zero then an exception would
> occur. This could happen with a corrupt packet trace or dissector logic
> failure.
>  
> Also corrected Attribute_Value/ Event Handling Profile routine. Missing
> case type of 0x2.

Checked in, along with some additional fixes of

	foffset += address_item(...);

to

	foffset = address_item(...);

(I noticed you had one such fix, and checked for others), and changes
to, for contexts, put the context length into the protocol tree.  (Some
other lengths should probably be put there as well.)