[Nagiosplug-checkins] nagiosplug/plugins check_http.c,1.104,1.105
Holger Weiss
hweiss at users.sourceforge.net
Fri Jun 15 20:31:40 CEST 2007
Update of /cvsroot/nagiosplug/nagiosplug/plugins
In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv3024
Modified Files:
check_http.c
Log Message:
`host_name' is a NULL pointer if the "-I" flag is used instead of "-H",
so use `server_address' instead. Fixes a possible segfault when
following redirects to relative URLs (reported by Ingo Lantschner).
Index: check_http.c
===================================================================
RCS file: /cvsroot/nagiosplug/nagiosplug/plugins/check_http.c,v
retrieving revision 1.104
retrieving revision 1.105
diff -u -d -r1.104 -r1.105
--- check_http.c 1 Jun 2007 23:08:24 -0000 1.104
+++ check_http.c 15 Jun 2007 18:31:37 -0000 1.105
@@ -148,7 +148,7 @@
if (display_html == TRUE)
printf ("<A HREF=\"%s://%s:%d%s\" target=\"_blank\">",
- use_ssl ? "https" : "http", host_name,
+ use_ssl ? "https" : "http", server_address,
server_port, server_url);
/* initialize alarm signal handling, set socket timeout, start timer */
@@ -1141,7 +1141,7 @@
}
i = server_port;
strcpy (type, server_type);
- strcpy (addr, host_name);
+ strcpy (addr, server_address);
}
else {
More information about the Commits
mailing list