Bug 110749 - broken source code
Summary: broken source code
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: ethereal
Version: 1
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Phil Knirsch
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2003-11-24 13:51 UTC by d.binderman
Modified: 2015-03-05 01:13 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2003-11-25 14:41:55 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

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


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