Bug 116562 - array subscript out of range
Summary: array subscript out of range
Status: CLOSED NEXTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: yp-tools   
(Show other bugs)
Version: 2
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Steve Dickson
QA Contact:
URL:
Whiteboard:
Keywords: EasyFix
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2004-02-23 09:17 UTC by d.binderman
Modified: 2007-11-30 22:10 UTC (History)
1 user (show)

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


Attachments (Terms of Use)

Description d.binderman 2004-02-23 09:17:38 UTC
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-19 00:10:18 UTC
Fix committed to CVS


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