[Nagiosplug-checkins] CVS: nagiosplug/plugins check_dig.c,1.4,1.5

Karl DeBisschop kdebisschop at users.sourceforge.net
Tue Nov 19 17:10:11 CET 2002


Update of /cvsroot/nagiosplug/nagiosplug/plugins
In directory sc8-pr-cvs1:/tmp/cvs-serv32245/plugins

Modified Files:
	check_dig.c 
Log Message:
replace some strcpy with strscpy

Index: check_dig.c
===================================================================
RCS file: /cvsroot/nagiosplug/nagiosplug/plugins/check_dig.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -r1.4 -r1.5
*** check_dig.c	12 Nov 2002 11:28:58 -0000	1.4
--- check_dig.c	20 Nov 2002 01:09:51 -0000	1.5
***************
*** 47,51 ****
  	char input_buffer[MAX_INPUT_BUFFER];
  	char *command_line = NULL;
! 	char *output = NULL;
  	int result = STATE_UNKNOWN;
  
--- 47,51 ----
  	char input_buffer[MAX_INPUT_BUFFER];
  	char *command_line = NULL;
! 	char *output = "";
  	int result = STATE_UNKNOWN;
  
***************
*** 95,99 ****
  			}
  			else {
! 				strcpy (output, "Server not found in ANSWER SECTION");
  				result = STATE_WARNING;
  			}
--- 95,99 ----
  			}
  			else {
! 				strscpy (output, "Server not found in ANSWER SECTION");
  				result = STATE_WARNING;
  			}
***************
*** 105,109 ****
  
  	if (result != STATE_OK) {
! 		strcpy (output, "No ANSWER SECTION found");
  	}
  
--- 105,109 ----
  
  	if (result != STATE_OK) {
! 		strscpy (output, "No ANSWER SECTION found");
  	}
  
***************
*** 113,117 ****
  		printf ("%s", input_buffer);
  		if (!strcmp (output, ""))
! 			strcpy (output, 1 + index (input_buffer, ':'));
  	}
  
--- 113,117 ----
  		printf ("%s", input_buffer);
  		if (!strcmp (output, ""))
! 			strscpy (output, 1 + index (input_buffer, ':'));
  	}
  
***************
*** 122,126 ****
  		result = max_state (result, STATE_WARNING);
  		if (!strcmp (output, ""))
! 			strcpy (output, "nslookup returned error status");
  	}
  
--- 122,126 ----
  		result = max_state (result, STATE_WARNING);
  		if (!strcmp (output, ""))
! 			strscpy (output, "nslookup returned error status");
  	}
  





More information about the Commits mailing list