Bug 598552 - serv_list.c:487: array subscript is above array bounds
Summary: serv_list.c:487: array subscript is above array bounds
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: ypbind (Show other bugs)
(Show other bugs)
Version: 6.0
Hardware: All Linux
Target Milestone: rc
: ---
Assignee: Karel Klíč
QA Contact: Karel Volný
Depends On:
TreeView+ depends on / blocked
Reported: 2010-06-01 15:40 UTC by Karel Klíč
Modified: 2013-03-03 23:01 UTC (History)
4 users (show)

Fixed In Version: ypbind-1.20.4-27.el6
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2010-11-10 22:00:19 UTC
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 15:40 UTC, Karel Klíč
no flags Details | Diff

Description Karel Klíč 2010-06-01 15:40:08 UTC
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 10:13:05 UTC
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 09:16:03 UTC
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 22:00:19 UTC
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.