Bug 143298

Summary: array subscript out of range
Product: [Fedora] Fedora Reporter: David Binderman <dcb314>
Component: etherealAssignee: Radek Vokál <rvokal>
Status: CLOSED UPSTREAM QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: rawhide   
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2004-12-21 12:19:07 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description David Binderman 2004-12-18 10:56:12 UTC
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-21 04:07:01 UTC
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;