Bugzilla will be upgraded to version 5.0 on a still to be determined date in the near future. The original upgrade date has been delayed.
Bug 598552 - serv_list.c:487: array subscript is above array bounds
serv_list.c:487: array subscript is above array bounds
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: ypbind (Show other bugs)
All Linux
low Severity medium
: rc
: ---
Assigned To: Karel Klíč
Karel Volný
Depends On:
  Show dependency treegraph
Reported: 2010-06-01 11:40 EDT by Karel Klíč
Modified: 2013-03-03 18:01 EST (History)
4 users (show)

See Also:
Fixed In Version: ypbind-1.20.4-27.el6
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2010-11-10 17:00:19 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
Fix for "array subscript is above array bounds" (483 bytes, patch)
2010-06-01 11:40 EDT, Karel Klíč
no flags Details | Diff

  None (edit)
Description Karel Klíč 2010-06-01 11:40:08 EDT
Created attachment 418690 [details]
Fix for "array subscript is above array bounds"

Description of problem:
Compiler warning:
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.
Comment 2 RHEL Product and Program Management 2010-06-03 06:13:05 EDT
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
Comment 4 Karel Volný 2010-10-01 05:16:03 EDT
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:
Comment 5 releng-rhel@redhat.com 2010-11-10 17:00:19 EST
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.

Note You need to log in before you can comment on or make changes to this bug.