Red Hat Bugzilla – Bug 598552
serv_list.c:487: array subscript is above array bounds
Last modified: 2013-03-03 18:01:27 EST
Created attachment 418690 [details]
Fix for "array subscript is above array bounds"
Description of problem:
serv_list.c: In function 'add_server':
serv_list.c:487: warning: array subscript is above array bounds
GCC is right in this case. The array is accessed wrongly when the ypbind client is attached to _MAXSERVER (=30) servers and receives request to add another server.
This flaw has been fixed in newer release of ypbind, and the fix is obvious.
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux major release. Product Management has requested further
review of this request by Red Hat Engineering, for potential inclusion in a Red
Hat Enterprise Linux Major release. This request is not yet committed for
the patch applies cleanly:
+ echo 'Patch #11 (ypbind-mt-1.20.4-add-server.patch):'
Patch #11 (ypbind-mt-1.20.4-add-server.patch):
+ /bin/cat /builddir/build/SOURCES/ypbind-mt-1.20.4-add-server.patch
+ /usr/bin/patch -s -p1 -b --suffix .add-server --fuzz=0
and the build log does not contain the warning, as can be seen here:
the older version has the warning, see for example here:
Red Hat Enterprise Linux 6.0 is now available and should resolve
the problem described in this bug report. This report is therefore being closed
with a resolution of CURRENTRELEASE. You may reopen this bug report if the
solution does not work for you.