Ethereal-dev: [Ethereal-dev] Should alloc_field_info() check for start value inside tvb?

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

From: Ulf Lamping <ulf.lamping@xxxxxx>
Date: Sat, 26 Mar 2005 13:50:49 +0100
Hi Gerald, Guy!

As looking at the recent buildbot problems, and the changes you've done
Guy, I'm asking myself if the function alloc_field_info(proto.c 2006)
*always* should check if the start parameter is inside the tvb.

Or are there any circumstances, where this is intentionally *not* the case?

Another question, is this a:

- [Malformed Packet] "tvb_ensure_length_remaining(tvb, start)" or a
- [Dissector Bug] "DISSECTOR_ASSERT(tvb_reported_length_remaining(tvb,
start) != -1)"?

I would tend to use [Malformed Packet], just like an invalid length
parameter.

Regards, ULFL