Ethereal-dev: Re: [Ethereal-dev] PATCH : packet_info.h

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

From: Guy Harris <guy@xxxxxxxxxx>
Date: Fri, 28 Feb 2003 12:30:00 -0800
On Fri, Feb 28, 2003 at 05:00:09PM +0100, MEYER Laurent wrote:
>     This patch report a bug on the ADDRESSES_EQUAL macro

Checked in, with a change to first check whether the address types are
the same and, if so, to check whether the first one is AT_NONE.

> When filling up packet address, some dissectors, if address type is
> AT_NONE
> don't fill the others fields. So there may have amything into these
> fields.

Well, for AT_NONE they arguably should set "len" to 0 and "data" to a
null pointer; however, ANSI C doesn't appear to describe what happens if
"memcmp()" is passed a length of 0, so we still have to check for
AT_NONE.