Bug 110749 - broken source code
broken source code
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: ethereal (Show other bugs)
1
All Linux
medium Severity medium
: ---
: ---
Assigned To: Phil Knirsch
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2003-11-24 08:51 EST by d.binderman
Modified: 2015-03-04 20:13 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2003-11-25 09:41:55 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 d.binderman 2003-11-24 08:51:28 EST
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 09:41:55 EST
Fixed in ethereal-0.9.16-3 and later.

Read ya, Phil

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