[Nagios-devel] check_mrtg* segfaults
Posted: Fri Nov 25, 2011 9:20 pm
[Sorry to post this to nagios-devel instead of a nagios-plugins
mailinglist, but I'm not subscribed there and I seem to be unable to
find the list of mailinglists offhand. The link "Community mailing
lists" on http://www.nagios.org/support , pointing to
http://wiki.nagios.org/index.php/Mail_Lists , seems to get
404ed-slash-redirected to the wiki's main page and using the wiki's
search function turns up nada.]
I tried to help someone whose check_mrtgtraf kept segfaulting during the
last couple days, the problem turning out to be that he had pointed it
to the wrong file. It seems that check_mrtg and check_mrtgtraf (up to
and including 1.4.15) aren't prepared to deal with syntax problems in
their input file.
The (quickest possible) fix is pretty trivial: Expand every
temp_buffer =3D strtok (input_buffer, " ");
[whatever] =3D strtoul (temp_buffer, NULL, 10);
into
temp_buffer =3D strtok (input_buffer, " ");
if (temp_buffer =3D=3D NULL) {
printf (_("Cannot parse MRTG log file\n"));
return STATE_UNKNOWN;
}
[whatever] =3D strtoul (temp_buffer, NULL, 10);
Kind regards,
J. Bern
--=20
Jochen Bern, Systemingenieur --- LINworks GmbH
Postfach 100121, 64201 Darmstadt | Robert-Koch-Str. 9, 64331 Weiterstadt
PGP (1024D/4096g) FP =3D D18B 41B1 16C0 11BA 7F8C DCF7 E1D5 FAF4 444E 1C2=
7
Tel. +49 6151 9067-231, Zentr. -0, Fax -299 - Amtsg. Darmstadt HRB 85202
Unternehmenssitz Weiterstadt, Gesch=E4ftsf=FChrer Metin Dogan, Oliver Mic=
hel
This post was automatically imported from historical nagios-devel mailing list archives
Original poster: [email protected]
mailinglist, but I'm not subscribed there and I seem to be unable to
find the list of mailinglists offhand. The link "Community mailing
lists" on http://www.nagios.org/support , pointing to
http://wiki.nagios.org/index.php/Mail_Lists , seems to get
404ed-slash-redirected to the wiki's main page and using the wiki's
search function turns up nada.]
I tried to help someone whose check_mrtgtraf kept segfaulting during the
last couple days, the problem turning out to be that he had pointed it
to the wrong file. It seems that check_mrtg and check_mrtgtraf (up to
and including 1.4.15) aren't prepared to deal with syntax problems in
their input file.
The (quickest possible) fix is pretty trivial: Expand every
temp_buffer =3D strtok (input_buffer, " ");
[whatever] =3D strtoul (temp_buffer, NULL, 10);
into
temp_buffer =3D strtok (input_buffer, " ");
if (temp_buffer =3D=3D NULL) {
printf (_("Cannot parse MRTG log file\n"));
return STATE_UNKNOWN;
}
[whatever] =3D strtoul (temp_buffer, NULL, 10);
Kind regards,
J. Bern
--=20
Jochen Bern, Systemingenieur --- LINworks GmbH
Postfach 100121, 64201 Darmstadt | Robert-Koch-Str. 9, 64331 Weiterstadt
PGP (1024D/4096g) FP =3D D18B 41B1 16C0 11BA 7F8C DCF7 E1D5 FAF4 444E 1C2=
7
Tel. +49 6151 9067-231, Zentr. -0, Fax -299 - Amtsg. Darmstadt HRB 85202
Unternehmenssitz Weiterstadt, Gesch=E4ftsf=FChrer Metin Dogan, Oliver Mic=
hel
This post was automatically imported from historical nagios-devel mailing list archives
Original poster: [email protected]