Bug 167136 - array subscript out of range
Summary: array subscript out of range
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Fedora
Classification: Fedora
Component: xorg-x11
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: X/OpenGL Maintenance List
QA Contact: David Lawrence
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2005-08-30 20:41 UTC by David Binderman
Modified: 2007-11-30 22:11 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2005-09-14 08:45:57 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description David Binderman 2005-08-30 20:41:49 UTC
Description of problem:
I just tried to compile package xorg-x11-6.8.2-45 from Redhat
Fedora Core development tree with a special development version of the
GNU C compiler.

The compiler said

1.

DigitalEdge.c:616: warning: array subscript out of range

The source code is

	pressure = priv->dedgeData[6] + (priv->dedgeData[5] >> 4) * 128;

but earlier in the same file,

    unsigned char dedgeData[5]; /* data read on the device */

so priv->dedgeData[6] and priv->dedgeData[5] doesn't exist. 

Suggest code rework.




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


How reproducible:


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


Expected results:


Additional info:

Comment 1 Mike A. Harris 2005-09-14 08:45:57 UTC
http://bugs.freedesktop.org in the "xorg" component is the proper place
to report compiler warnings and other developmental bugs to X.Org developers.



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