Bug 80820 - broken source code
Summary: broken source code
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: raidtools (Show other bugs)
(Show other bugs)
Version: 8.0
Hardware: All Linux
medium
medium
Target Milestone: ---
Assignee: Doug Ledford
QA Contact: David Lawrence
URL:
Whiteboard:
Keywords:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2002-12-31 18:01 UTC by d.binderman
Modified: 2007-04-18 16:49 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2004-11-27 23:18:32 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 2002-12-31 18:01:43 UTC
From Bugzilla Helper:
User-Agent: Mozilla/4.6 [en-gb]C-CCK-MCD NetscapeOnline.co.uk  (Win98; I)

Description of problem:

Hello there,

I have just tried to compile raidtools-1.00.2-3.3 from Redhat 8.0

Here are some of the messages the compiler produces

cc: Info: scsi.c, line 277: 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.


./scsi.c.old ./scsi.c
*** ./scsi.c.old	Tue Dec 24 22:14:12 2002
--- ./scsi.c	Tue Dec 24 22:14:47 2002
***************
*** 274,280 ****
      memcpy((void *)&sg_dev->revision[0], (const void *)&cmd.buf[32], 4);
      sg_dev->vendor[8] = '\0';
      sg_dev->product[16] = '\0';
!     sg_dev->revision[5] = '\0';
  
      /*
       * First try the device ID page.  Then get the serial number.
--- 274,280 ----
      memcpy((void *)&sg_dev->revision[0], (const void *)&cmd.buf[32], 4);
      sg_dev->vendor[8] = '\0';
      sg_dev->product[16] = '\0';
!     sg_dev->revision[ 4] = '\0';
  
      /*
       * First try the device ID page.  Then get the serial number.


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


How reproducible:
Always

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

Additional info:


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