Bugzilla – Bug 148236
xorg-x11-6.9.0-9: 2 * array subscript out of range
Last modified: 2006-02-06 21:18:17 UTC
I just tried to compile package xorg-x11-6.9.0-9 with a non standard version of the GNU C compiler. It said 1. arbprogparse.c:3262: warning: array subscript out of range The source code is vp->SrcReg[3].Swizzle = SWIZZLE_NOOP; I agree with the compiler. Suggest code rework. 2. xf86Calcomp.c:411: warning: array subscript out of range The source code is y = priv->packet[5] + priv->packet[4]*128 +priv->packet[3]*128*128; but #define CALCOMP_PACKET_SIZE 5 so priv->packet[5] does not exist. Suggest code rework.
Indeed. This looks broken. :-(
> arbprogparse.c:3262: warning: array subscript out of range > > The source code is > > vp->SrcReg[3].Swizzle = SWIZZLE_NOOP; > > I agree with the compiler. Suggest code rework. This has been fixed in current Mesa CVS (big changes, that I don't want to adopt at this point). > 2. > > xf86Calcomp.c:411: warning: array subscript out of range > > The source code is > > y = priv->packet[5] + priv->packet[4]*128 +priv->packet[3]*128*128; > > but > > #define CALCOMP_PACKET_SIZE 5 Not sure how to fix this without completely understanding the driver. Bug probably the define should be #define CALCOMP_PACKET_SIZE 6 Can anybody confirm this?
I've reported the input driver problem upstream now. --> https://bugs.freedesktop.org/show_bug.cgi?id=5830 Closing as FIXED therefore.