Ethereal-dev: [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: Radek Vokal <rvokal@xxxxxxxxxx>
Date: Mon, 20 Dec 2004 10:22:05 +0100
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