Bug 143298 - array subscript out of range
array subscript out of range
Status: CLOSED UPSTREAM
Product: Fedora
Classification: Fedora
Component: ethereal (Show other bugs)
rawhide
All Linux
medium Severity medium
: ---
: ---
Assigned To: Radek Vokal
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2004-12-18 05:56 EST by David Binderman
Modified: 2007-11-30 17:10 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2004-12-21 07:19:07 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description David Binderman 2004-12-18 05:56:12 EST
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.



Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.
2.
3.
  
Actual results:


Expected results:


Additional info:
Comment 1 Gerald Combs 2004-12-20 23:07:01 EST
Thanks.  The proposed change has been checked in, and will be in the
next Ethereal release.  After looking through the code, it appears
that this is not a security risk.  The only time t38_add_address() is
called, "SDP" is passed to the setup_method argument, which means that
"p_conv_data->method" is properly terminated.  The errant NULL byte is
immediately overwritten in line 237:

        p_conv_data->frame_number = setup_frame_number;


Note You need to log in before you can comment on or make changes to this bug.