Bug 140312

Summary: array subscript out of range
Product: [Fedora] Fedora Reporter: David Binderman <dcb314>
Component: kernel-utilsAssignee: Dave Jones <davej>
Status: CLOSED WONTFIX QA Contact: Brian Brock <bbrock>
Severity: medium Docs Contact:
Priority: medium    
Version: 3CC: mattdm, pfrields
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2006-07-16 01:41:37 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

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:
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!