Bug 167136

Summary: array subscript out of range
Product: [Fedora] Fedora Reporter: David Binderman <dcb314>
Component: xorg-x11Assignee: X/OpenGL Maintenance List <xgl-maint>
Status: CLOSED WONTFIX QA Contact: David Lawrence <dkl>
Severity: medium Docs Contact:
Priority: medium    
Version: rawhide   
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: 2005-09-14 08:45:57 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 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.