summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 554758a)
raw | patch | inline | side by side (parent: 554758a)
author | Karl DeBisschop <kdebisschop@users.sourceforge.net> | |
Wed, 20 Nov 2002 01:09:51 +0000 (01:09 +0000) | ||
committer | Karl DeBisschop <kdebisschop@users.sourceforge.net> | |
Wed, 20 Nov 2002 01:09:51 +0000 (01:09 +0000) |
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@216 f882894a-f735-0410-b71e-b25c423dba1c
plugins/check_dig.c | patch | blob | history |
diff --git a/plugins/check_dig.c b/plugins/check_dig.c
index ba41ebda361eab74d6836b1ff332ed0a2e637bf6..ba9ff0df1bdbd71bdc9682a88b9f38888de68514 100644 (file)
--- a/plugins/check_dig.c
+++ b/plugins/check_dig.c
{
char input_buffer[MAX_INPUT_BUFFER];
char *command_line = NULL;
- char *output = NULL;
+ char *output = "";
int result = STATE_UNKNOWN;
/* Set signal handling and alarm */
result = STATE_OK;
}
else {
- strcpy (output, "Server not found in ANSWER SECTION");
+ strscpy (output, "Server not found in ANSWER SECTION");
result = STATE_WARNING;
}
}
if (result != STATE_OK) {
- strcpy (output, "No ANSWER SECTION found");
+ strscpy (output, "No ANSWER SECTION found");
}
while (fgets (input_buffer, MAX_INPUT_BUFFER - 1, child_stderr)) {
result = max_state (result, STATE_WARNING);
printf ("%s", input_buffer);
if (!strcmp (output, ""))
- strcpy (output, 1 + index (input_buffer, ':'));
+ strscpy (output, 1 + index (input_buffer, ':'));
}
(void) fclose (child_stderr);
if (spclose (child_process)) {
result = max_state (result, STATE_WARNING);
if (!strcmp (output, ""))
- strcpy (output, "nslookup returned error status");
+ strscpy (output, "nslookup returned error status");
}
(void) time (&end_time);