X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=plugins%2Fcheck_dns.c;h=19649f50045bbfdde8c1a8f27239bc4b2dea11b6;hb=782bc207d5697f539beb1fd3359ce81d22e26a54;hp=c0ea298278049237e8f86fe9a4690851e2d86052;hpb=e04ceb973cbe2ec5c4d862ddff90667dea725d6f;p=nagiosplug.git diff --git a/plugins/check_dns.c b/plugins/check_dns.c index c0ea298..19649f5 100644 --- a/plugins/check_dns.c +++ b/plugins/check_dns.c @@ -132,7 +132,11 @@ main (int argc, char **argv) printf ("%s\n", input_buffer); if ((temp_buffer = index (input_buffer, ':'))) { - address = strscpy (address, temp_buffer + 2); + temp_buffer++; + /* Strip leading spaces */ + for (; *temp_buffer != '\0' && *temp_buffer == ' '; temp_buffer++) + /* NOOP */; + address = strscpy (address, temp_buffer); strip (address); result = STATE_OK; }