diff options
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/check_dig.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/plugins/check_dig.c b/plugins/check_dig.c index ba41ebda..ba9ff0df 100644 --- a/plugins/check_dig.c +++ b/plugins/check_dig.c | |||
@@ -46,7 +46,7 @@ main (int argc, char **argv) | |||
46 | { | 46 | { |
47 | char input_buffer[MAX_INPUT_BUFFER]; | 47 | char input_buffer[MAX_INPUT_BUFFER]; |
48 | char *command_line = NULL; | 48 | char *command_line = NULL; |
49 | char *output = NULL; | 49 | char *output = ""; |
50 | int result = STATE_UNKNOWN; | 50 | int result = STATE_UNKNOWN; |
51 | 51 | ||
52 | /* Set signal handling and alarm */ | 52 | /* Set signal handling and alarm */ |
@@ -94,7 +94,7 @@ main (int argc, char **argv) | |||
94 | result = STATE_OK; | 94 | result = STATE_OK; |
95 | } | 95 | } |
96 | else { | 96 | else { |
97 | strcpy (output, "Server not found in ANSWER SECTION"); | 97 | strscpy (output, "Server not found in ANSWER SECTION"); |
98 | result = STATE_WARNING; | 98 | result = STATE_WARNING; |
99 | } | 99 | } |
100 | 100 | ||
@@ -104,7 +104,7 @@ main (int argc, char **argv) | |||
104 | } | 104 | } |
105 | 105 | ||
106 | if (result != STATE_OK) { | 106 | if (result != STATE_OK) { |
107 | strcpy (output, "No ANSWER SECTION found"); | 107 | strscpy (output, "No ANSWER SECTION found"); |
108 | } | 108 | } |
109 | 109 | ||
110 | while (fgets (input_buffer, MAX_INPUT_BUFFER - 1, child_stderr)) { | 110 | while (fgets (input_buffer, MAX_INPUT_BUFFER - 1, child_stderr)) { |
@@ -112,7 +112,7 @@ main (int argc, char **argv) | |||
112 | result = max_state (result, STATE_WARNING); | 112 | result = max_state (result, STATE_WARNING); |
113 | printf ("%s", input_buffer); | 113 | printf ("%s", input_buffer); |
114 | if (!strcmp (output, "")) | 114 | if (!strcmp (output, "")) |
115 | strcpy (output, 1 + index (input_buffer, ':')); | 115 | strscpy (output, 1 + index (input_buffer, ':')); |
116 | } | 116 | } |
117 | 117 | ||
118 | (void) fclose (child_stderr); | 118 | (void) fclose (child_stderr); |
@@ -121,7 +121,7 @@ main (int argc, char **argv) | |||
121 | if (spclose (child_process)) { | 121 | if (spclose (child_process)) { |
122 | result = max_state (result, STATE_WARNING); | 122 | result = max_state (result, STATE_WARNING); |
123 | if (!strcmp (output, "")) | 123 | if (!strcmp (output, "")) |
124 | strcpy (output, "nslookup returned error status"); | 124 | strscpy (output, "nslookup returned error status"); |
125 | } | 125 | } |
126 | 126 | ||
127 | (void) time (&end_time); | 127 | (void) time (&end_time); |