Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 80818 - bad source code
Summary: bad source code
Status: CLOSED DUPLICATE of bug 57350
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: pump
Version: 8.0
Hardware: All
OS: Linux
Target Milestone: ---
Assignee: Eido Inoue
QA Contact:
Depends On:
TreeView+ depends on / blocked
Reported: 2002-12-31 17:57 UTC by d.binderman
Modified: 2008-05-01 15:38 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2006-02-21 18:50:49 UTC

Attachments (Terms of Use)

Description d.binderman 2002-12-31 17:57:04 UTC
From Bugzilla Helper:
User-Agent: Mozilla/4.6 [en-gb]C-CCK-MCD  (Win98; I)

Description of problem:

Hello there,

I have just tried to compile pump-0.8.12-3 from Redhat 8.0

Here are some of the messages the compiler produces

cc: Info: pump.c, line 600: In this statement, an array is being accessed outside the bounds specified for the array type. (subscrbounds)

Here is an untested patch to shut up the compiler.

./pump.c.old ./pump.c
*** ./pump.c.old	Tue Dec 24 21:33:57 2002
--- ./pump.c	Tue Dec 24 21:36:21 2002
*** 597,603 ****
  		    if (intf[i].set & PUMP_NETINFO_HAS_HOSTNAME)
  			    intf->hostname, sizeof(cmd.u.status.hostname));
! 		    cmd.u.status.hostname[sizeof(cmd.u.status.hostname)] = '\0';
  		    if (intf[i].set & PUMP_NETINFO_HAS_DOMAIN)
--- 597,603 ----
  		    if (intf[i].set & PUMP_NETINFO_HAS_HOSTNAME)
  			    intf->hostname, sizeof(cmd.u.status.hostname));
! 		    cmd.u.status.hostname[sizeof(cmd.u.status.hostname) - 1] = '\0';
  		    if (intf[i].set & PUMP_NETINFO_HAS_DOMAIN)

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

How reproducible:

Steps to Reproduce:
1. compile with any C compiler that checks array indexes, for example Compaq.

Additional info:

Comment 1 Eido Inoue 2003-03-11 23:06:33 UTC

*** This bug has been marked as a duplicate of 57350 ***

Comment 2 Red Hat Bugzilla 2006-02-21 18:50:49 UTC
Changed to 'CLOSED' state since 'RESOLVED' has been deprecated.

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