Bug 133245

Summary: nagios-plugins-sap-ccms-0.7.2-46 : 2 * array subscript out of range
Product: [openSUSE] SUSE LINUX 10.0 Reporter: David Binderman <dcb314>
Component: BasesystemAssignee: Wolfgang Rosenauer <wolfgang.rosenauer>
Status: RESOLVED FIXED QA Contact: E-mail List <qa-bugs>
Severity: Minor    
Priority: P5 - None    
Version: Final   
Target Milestone: ---   
Hardware: All   
OS: SuSE Linux 10.0   
Whiteboard:
Found By: Other Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---

Description David Binderman 2005-11-10 12:53:42 UTC
I just tried to compile package nagios-plugins-sap-ccms-0.7.2-46 with the Intel C
compiler.

It said

1.

agnt_mon.c(472): warning #175: subscript out of range

The source code is

	(*nodes)[crow].Lastvaldat[MT_DATE_LENGTH] = '\0';

but

#define MT_DATE_LENGTH                     8

	char Lastvaldat[MT_TIME_LENGTH+1];

#define MT_TIME_LENGTH                     6

so the buffer is only 7 chars long, but the code tries to access index 8.
Suggest code rework.

2.

agnt_mon.c(475): warning #175: subscript out of range

Duplicate.
Comment 1 Wolfgang Rosenauer 2005-12-28 09:11:11 UTC
do you see problems with using

char Lastvaldat[MT_DATE_LENGTH+1];
char Lastvaltim[MT_TIME_LENGTH+1];

?
Comment 2 David Binderman 2005-12-28 10:09:29 UTC
>do you see problems with using

Looks ok to me.

I'll be testing this package in less than a week's time, so if there
is a new version, so much the better.
Comment 3 Wolfgang Rosenauer 2005-12-28 11:09:51 UTC
new binary and source packages for testing will be available soon on
ftp://ftp.suse.com/pub/projects/stark/nagios/10.0/

Marking as fixed (please reopen if needed)
Comment 4 Wolfgang Rosenauer 2005-12-28 11:11:25 UTC
sorry, the link is:
ftp://ftp.suse.com/pub/people/stark/nagios/10.0/