Bug 140312 - array subscript out of range
Summary: array subscript out of range
Status: CLOSED WONTFIX
Alias: None
Product: Fedora
Classification: Fedora
Component: kernel-utils
Version: 3
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Dave Jones
QA Contact: Brian Brock
URL:
Whiteboard:
Keywords:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2004-11-22 09:31 UTC by David Binderman
Modified: 2015-01-04 22:12 UTC (History)
2 users (show)

(edit)
Clone Of:
(edit)
Last Closed: 2006-07-16 01:41:37 UTC


Attachments (Terms of Use)

Description David Binderman 2004-11-22 09:31:19 UTC
Description of problem:

I just tried to compile package kernel-utils-2.4-13.1.39 from 
Redhat Fedora Core 3.

The compiler said

cpuspeed.cc(451): warning #175: subscript out of range

The source code is

            saved_governor[MAX_CPUS][MAX_SAVE_STRING] = '\0';

but, just a few lines before

    static char saved_governor[MAX_CPUS][MAX_SAVE_STRING+1];

So it is clear that saved_governor[MAX_CPUS] doesn't exist.

Suggest code re-work. 


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


How reproducible:


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


Expected results:


Additional info:

Comment 1 Carl Thompson 2005-04-12 07:15:14 UTC
This is broken code from a Red Hat patch. I suggest downloading my original
CPUSpeed 1.2.1 sources from http://carlthompson.net/software/cpuspeed .

Carl Thompson

Comment 2 Matthew Miller 2006-07-10 21:22:57 UTC
Fedora Core 3 is now maintained by the Fedora Legacy project for security
updates only. If this problem is a security issue, please reopen and
reassign to the Fedora Legacy product. If it is not a security issue and
hasn't been resolved in the current FC5 updates or in the FC6 test
release, reopen and change the version to match.

Thank you!



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