Bug 167136 - array subscript out of range
array subscript out of range
Status: CLOSED WONTFIX
Product: Fedora
Classification: Fedora
Component: xorg-x11 (Show other bugs)
rawhide
All Linux
medium Severity medium
: ---
: ---
Assigned To: X/OpenGL Maintenance List
David Lawrence
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2005-08-30 16:41 EDT by David Binderman
Modified: 2007-11-30 17:11 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2005-09-14 04:45:57 EDT
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 David Binderman 2005-08-30 16:41:49 EDT
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 04:45:57 EDT
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.