Ethereal-dev: Re: [Ethereal-dev] array subscript out of range

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

From: Gerald Combs <gerald@xxxxxxxxxxxx>
Date: Mon, 20 Dec 2004 22:07:16 -0600
Checked in.

Radek Vokal wrote:
> This comes from redhat bugzilla, please consider the folowing patch
> suggestion, can't say if it's correct or if the part in code is just
> dirty hack.
> 
> Radek
> 
> 
> https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=143298
> 
> Description of problem:
> 
> I just tried to compile package ethereal-0.10.8-1 from 
> Redhat Fedora development tree.
> 
> The compiler said
> 
> packet-t38.c(236): warning #175: subscript out of range
> 
> The source code is
> 
>         p_conv_data->method[MAX_T38_SETUP_METHOD_SIZE] = '\0';
> 
> Suggest 
> 
>         p_conv_data->method[MAX_T38_SETUP_METHOD_SIZE - 1] = '\0';
> 
> might be better code.
> 
> 
> --
> Radek Vokál <rvokal@xxxxxxxxxx> -- Red Hat, Inc.
> 
> Linux 2.6.9-1.681_FC3smp #1 SMP Thu Nov 18 15:19:10 EST 2004 i686
> GNU/Linux
> 
> _______________________________________________
> Ethereal-dev mailing list
> Ethereal-dev@xxxxxxxxxxxx
> http://www.ethereal.com/mailman/listinfo/ethereal-dev