Bug 133245 - nagios-plugins-sap-ccms-0.7.2-46 : 2 * array subscript out of range
Summary: nagios-plugins-sap-ccms-0.7.2-46 : 2 * array subscript out of range
Status: RESOLVED FIXED
Alias: None
Product: SUSE LINUX 10.0
Classification: openSUSE
Component: Basesystem (show other bugs)
Version: Final
Hardware: All SuSE Linux 10.0
: P5 - None : Minor
Target Milestone: ---
Assignee: Wolfgang Rosenauer
QA Contact: E-mail List
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-11-10 12:53 UTC by David Binderman
Modified: 2005-12-28 11:11 UTC (History)
0 users

See Also:
Found By: Other
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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/