Bug 151543

Summary: nvtv-0.4.7-12: array subscript out of range
Product: [openSUSE] SUSE LINUX 10.0 Reporter: David Binderman <dcb314>
Component: BasesystemAssignee: Stefan Dirsch <sndirsch>
Status: RESOLVED FIXED QA Contact: E-mail List <qa-bugs>
Severity: Minor    
Priority: P2 - High    
Version: unspecified   
Target Milestone: ---   
Hardware: All   
OS: SuSE Linux 10.1   
Whiteboard:
Found By: Other Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---

Description David Binderman 2006-02-16 16:53:46 UTC
I just tried to compile package nvtv-0.4.7-12 with a non standard version
of the GNU C compiler.

It said

1.

back_nvidia.c:234: warning: array subscript out of range

The source code is

	pNv->arch.freqM[4] = 0;

but

linux:/usr/src/packages/SPECS # find ../BUILD/nvtv-0.4.7/ -name \*.h -print | xargs fgrep "freqM["
../BUILD/nvtv-0.4.7/src/nv_type.h:  long freqM[4];    /* ascending limit frequencies for maxM, in kHz */

so pNv->arch.freqM[4] does not exist. Suggest make array one element larger.
Comment 1 Stefan Dirsch 2006-02-23 11:53:19 UTC
I've contacted the author and he confirmed that it should be

  pNv->arch.freqM[3] = 0;

instead. Fixed for Beta > 5.