Bug 152045

Summary: procmeter-3.4a-176: array subscript out of range
Product: [openSUSE] SUSE LINUX 10.0 Reporter: David Binderman <dcb314>
Component: BasesystemAssignee: Pavel Nemec <pnemec>
Status: RESOLVED FIXED QA Contact: E-mail List <qa-bugs>
Severity: Normal    
Priority: P5 - None    
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-18 12:38:24 UTC
I just tried to compile package procmeter-3.4a-176 with the Intel C compiler.

It said

module.c(327): warning #175: subscript out of range

The source code is

	new->outputs[noutputs]->label[PROCMETER_NAME_LEN]=0;

but

linux:/usr/src/packages/SPECS # find ../BUILD/procmeter3-3.4a/ -name \*.h -print | xargs fgrep "label["
../BUILD/procmeter3-3.4a/procmeterp.h: char label[PROCMETER_NAME_LEN];/*+ The label for the output.
+*/

Suggest new code

	new->outputs[noutputs]->label[ PROCMETER_NAME_LEN - 1]=0;
Comment 1 Pavel Nemec 2006-02-24 10:58:21 UTC
fixed for beta5