[Nagios-devel] Bug in xodtemplate.c
Posted: Fri Jun 24, 2005 2:00 am
This message is in MIME format.
--=_6nq5vihdf8g0
Content-Type: text/plain;
charset=ISO-8859-1
Content-Disposition: inline
Content-Transfer-Encoding: 7bit
Hi,
I've found a Bug in the latest nagios release 23.12.2005. In
xodtemplate_register_servicegroup() (/xdata/xodtemplate.c). There is no check
if this_servicegroup->members is NULL. This causes strtok to return nonsense.
A patch for the problem is attached.
kind regards
Andreas Schoder
--
"Handle so, dass die Maxime deines Willens jederzeit zugleich als Prinzip einer
allgemeinen Gesetzgebung gelten koennte." - Immanuel Kant, dt. Philosoph
/ \
email: [email protected] web: www.schoder.priv.at
\ /
--=_6nq5vihdf8g0
Content-Type: text/x-patch;
charset=ISO-8859-1;
name="nagios.patch"
Content-Disposition: attachment;
filename="nagios.patch"
Content-Transfer-Encoding: 7bit
diff -r -U 3 nagios-cvs/xdata/xodtemplate.c nagios-cvs-patched/xdata/xodtemplate.c
--- nagios-cvs/xdata/xodtemplate.c 2005-06-24 11:32:11.951033304 +0200
+++ nagios-cvs-patched/xdata/xodtemplate.c 2005-06-24 11:33:45.349834528 +0200
@@ -7598,6 +7598,7 @@
}
/* add all members to servicegroup */
+ if(this_servicegroup->members != NULL) {
for(host_name=strtok(this_servicegroup->members,",");host_name!=NULL;host_name=strtok(NULL,",")){
strip(host_name);
svc_description=strtok(NULL,",");
@@ -7621,6 +7622,7 @@
return ERROR;
}
}
+ }
#ifdef DEBUG0
printf("xodtemplate_register_servicegroup() end\n");
--=_6nq5vihdf8g0--
This post was automatically imported from historical nagios-devel mailing list archives
Original poster: [email protected]
--=_6nq5vihdf8g0
Content-Type: text/plain;
charset=ISO-8859-1
Content-Disposition: inline
Content-Transfer-Encoding: 7bit
Hi,
I've found a Bug in the latest nagios release 23.12.2005. In
xodtemplate_register_servicegroup() (/xdata/xodtemplate.c). There is no check
if this_servicegroup->members is NULL. This causes strtok to return nonsense.
A patch for the problem is attached.
kind regards
Andreas Schoder
--
"Handle so, dass die Maxime deines Willens jederzeit zugleich als Prinzip einer
allgemeinen Gesetzgebung gelten koennte." - Immanuel Kant, dt. Philosoph
/ \
email: [email protected] web: www.schoder.priv.at
\ /
--=_6nq5vihdf8g0
Content-Type: text/x-patch;
charset=ISO-8859-1;
name="nagios.patch"
Content-Disposition: attachment;
filename="nagios.patch"
Content-Transfer-Encoding: 7bit
diff -r -U 3 nagios-cvs/xdata/xodtemplate.c nagios-cvs-patched/xdata/xodtemplate.c
--- nagios-cvs/xdata/xodtemplate.c 2005-06-24 11:32:11.951033304 +0200
+++ nagios-cvs-patched/xdata/xodtemplate.c 2005-06-24 11:33:45.349834528 +0200
@@ -7598,6 +7598,7 @@
}
/* add all members to servicegroup */
+ if(this_servicegroup->members != NULL) {
for(host_name=strtok(this_servicegroup->members,",");host_name!=NULL;host_name=strtok(NULL,",")){
strip(host_name);
svc_description=strtok(NULL,",");
@@ -7621,6 +7622,7 @@
return ERROR;
}
}
+ }
#ifdef DEBUG0
printf("xodtemplate_register_servicegroup() end\n");
--=_6nq5vihdf8g0--
This post was automatically imported from historical nagios-devel mailing list archives
Original poster: [email protected]