Build break in xdm.
mcnichol at austin.ibm.com
mcnichol at austin.ibm.com
Wed Nov 9 13:56:25 PST 2005
> From: Alan Coopersmith <Alan.Coopersmith at Sun.COM>
>
> mcnichol at austin.ibm.com wrote:
> > I noticed that also. This is looking pretty strange right now.
> >
> > While I'm poking around my compiler flagged a couple of other problems:
> >
> >
> > xlc_r -O -D__STR31__ -DNDEBUG -I../.. -I../../exports/include -DSYSV -DAIXV3 -DAIXV4 -DAIXV5 -D_ALL_SOURCE -DFUNCPROTO=15 -DBINDIR=\"/xorg/X1132/bin\" -DXDMDIR=\"/xorg/X1132/lib/X11/xdm\" -DHASXDMAUTH -DUSE_PAM -DTCPCONN -DUNIXCONN -DHAS_STICKY_DIR_BIT -DHAS_FCHOWN -DIPv6 -DGREET_USER_STATIC -DOSMAJORVERSION=5 -DOSMINORVERSION=3 -DXPM -c access.c
> > "access.c", line 260.38: 1506-1298 (W) The subscript 256 is out of range. The valid range is 0 to 255.
>
> That code should be safe on most machines, since it's checking that the
> subscript is in range:
>
> 204 #define WORD_LEN 256
> 205 static char wordBuffer[WORD_LEN];
> [...]
> 260 if (wordp < &(wordBuffer[WORD_LEN]))
> 261 *wordp++ = c;
>
> I suppose 'if (wordp <= &(wordBuffer[WORD_LEN - 1]))' would be just as effective
> without flagging compiler warnings.
>
Hmmm... That does look like it should be valid.
I'll have to send a bug report into our compiler guys.
Dan
More information about the xorg
mailing list