Bug 110749

Summary: broken source code
Product: [Fedora] Fedora Reporter: d.binderman
Component: etherealAssignee: Phil Knirsch <pknirsch>
Status: CLOSED RAWHIDE QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 1CC: rvokal
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: 2003-11-25 14:41:55 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 d.binderman 2003-11-24 13:51:28 UTC
From Bugzilla Helper:
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows 98)

Description of problem:

I just tried to compile package ethereal-0_9_13-4_1 from the Fedora
distribution. The compiler said

packet-gtp.c(2544): warning #175: subscript out of range
packet-gtp.c(2548): warning #175: subscript out of range
packet-gtp.c(2548): warning #175: subscript out of range

The source code is

        guint8          byte[3];

		/* more code */
        byte[3] = tvb_get_guint8 (tvb, offset + 3);
		/* more code */
        proto_tree_add_uint(ext_tree_rai, gtp_version ? 
hf_gtpv1_rai_mnc : hf_gtpv0_rai_mnc, tvb, offset+2, 2, ((byte[3] & 
0xF0) >> 4 ) * 10  + (byte[3] & 0x0F));

Array sizes in C are exclusive, not inclusive. byte[ 3] does not 
exist.


Version-Release number of selected component (if applicable):
ethereal-0_9_13-4_1 

How reproducible:
Always

Steps to Reproduce:
1. by code inspection
2.
3.
    

Additional info:

Comment 1 Phil Knirsch 2003-11-25 14:41:55 UTC
Fixed in ethereal-0.9.16-3 and later.

Read ya, Phil