Bugzilla – Bug 155809
marsnwe-0.99.pl20-590: array subscript out of range
Last modified: 2007-10-11 16:00:54 UTC
I just tried to compile package marsnwe-0.99.pl20-590 with the Intel C compiler. It said ../nwbind.c(1904): warning #175: subscript out of range The source code is struct XDATA { uint8 count_handles[4]; uint8 handles[4]; } *xdata = (struct XDATA*) data; int open_files = GET_BE32(xdata->count_handles); int handle0 = open_files < 1 ? 0 : GET_BE32(xdata->handles); int handle1 = open_files < 2 ? 0 : GET_BE32(xdata->handles+4); I agree with the compiler. There are only four handles in xdata, so asking for xdata->handles+4 is off the end of the array. Suggest code rework.
Still broken in the later version that ships in Suse Linux 10.1
(In reply to comment #1) > Still broken in the later version that ships in Suse Linux 10.1 Still broken in Suse Linux 10.2 beta 1
Feel free to close as duplicate of Bug #235591.
*** This bug has been marked as a duplicate of bug 235591 ***