Ethereal-dev: Re: [Ethereal-dev] [PATCH] Disallow negative slice lengths

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

From: Graeme Hewson <ghewson@xxxxxxxxxxxxxxxxxxx>
Date: Sun, 30 May 2004 10:45:58 +0100
Graeme Hewson wrote:

> No replies to this, so here's a series of patches to disallow negative
> slice lengths and fix a few other things.
>
> scanner.l
>     Use gint32 instead of guint32 and strtol() instead of strtoul()
>     for signed integers.
>
>     Pathological slice specifications could cause Flex default rule
>     to be invoked, echoing characters to stdout.
>     Example: frame[0foo]==1
>
> syntax-tree.h
> syntax-tree.c
>     Use gint32 instead of guint32 for node data.
>
> semcheck.c
>     Check slice lengths as well as offsets.  Disallow negative/zero
>     lengths.
>
>     Range on RHS of display filter expression wasn't being checked in
>     every case.
>
> ftypes.c
>     Fix assertion failure when absolute value of negative slice
>     offset > field length.
>
>     Remove code for handling negative slice lengths.
>
> ethereal-filter.pod.template
>     Remove reference to negative slice lengths.
>
>     Clean and polish.

This set of patches seems to have been overlooked. Please could it be checked in.

If anyone wants to defend negative slice lengths, I can put them back in, but more importantly there's a fix for an assertion failure, and the patch to the documentation is well worthwhile, IMHO, amounting to changes on over 100 lines.


Graeme Hewson

Attachment: dfilter.tar.gz
Description: application/gzip