Bug 116562 - array subscript out of range
array subscript out of range
Status: CLOSED NEXTRELEASE
Product: Fedora
Classification: Fedora
Component: yp-tools (Show other bugs)
2
All Linux
medium Severity medium
: ---
: ---
Assigned To: Steve Dickson
: EasyFix
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2004-02-23 04:17 EST by d.binderman
Modified: 2007-11-30 17:10 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2004-06-18 20:39:23 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description d.binderman 2004-02-23 04:17:38 EST
Description of problem:

I just tried to compile Core2 Test1 package yp-tools-2.8-2

The compiler said

yppasswd.c(799): warning #175: subscript out of range

The source code is

      gecos[sizeof (gecos)] = '\0';

Suggest 

      gecos[sizeof (gecos) - 1] = '\0';

might be better code. Arrays are exclusive in C.


Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.
2.
3.
  
Actual results:


Expected results:


Additional info:
Comment 1 Alan Cox 2004-06-18 20:10:18 EDT
Fix committed to CVS

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