[Nagiosplug-checkins] CVS: nagiosplug/plugins check_http.c,1.23,1.24
Ton Voon
tonvoon at users.sourceforge.net
Fri Feb 21 14:00:16 CET 2003
Update of /cvsroot/nagiosplug/nagiosplug/plugins
In directory sc8-pr-cvs1:/tmp/cvs-serv3184
Modified Files:
check_http.c
Log Message:
Fixed coredump with unallocated string
Index: check_http.c
===================================================================
RCS file: /cvsroot/nagiosplug/nagiosplug/plugins/check_http.c,v
retrieving revision 1.23
retrieving revision 1.24
diff -C2 -r1.23 -r1.24
*** check_http.c 18 Feb 2003 21:56:24 -0000 1.23
--- check_http.c 21 Feb 2003 21:59:17 -0000 1.24
***************
*** 204,209 ****
char *server_address = "";
char *host_name = "";
! char *server_url = HTTP_URL;
! int server_url_length = 1;
int server_expect_yn = 0;
char server_expect[MAX_INPUT_BUFFER] = HTTP_EXPECT;
--- 204,209 ----
char *server_address = "";
char *host_name = "";
! char *server_url = "";
! int server_url_length;
int server_expect_yn = 0;
char server_expect[MAX_INPUT_BUFFER] = HTTP_EXPECT;
***************
*** 235,238 ****
--- 235,242 ----
{
int result = STATE_UNKNOWN;
+
+ /* Set default URL. Must be malloced for subsequent realloc if --onredirect=follow */
+ asprintf (&server_url, "%s", HTTP_URL);
+ server_url_length = strlen(server_url);
if (process_arguments (argc, argv) == ERROR)
More information about the Commits
mailing list