From e04ceb973cbe2ec5c4d862ddff90667dea725d6f Mon Sep 17 00:00:00 2001 From: Karl DeBisschop Date: Wed, 5 Feb 2003 05:58:35 +0000 Subject: [PATCH] allow check to proceed using servers from resolv.conf git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@290 f882894a-f735-0410-b71e-b25c423dba1c --- plugins/check_dns.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/plugins/check_dns.c b/plugins/check_dns.c index 3462701..c0ea298 100644 --- a/plugins/check_dns.c +++ b/plugins/check_dns.c @@ -352,22 +352,22 @@ process_arguments (int argc, char **argv) } c = optind; - if (query_address[0] == 0) { - if (is_host (argv[c]) == FALSE) { + if (strlen(query_address)==0 && c= ADDRESS_LENGTH) + if (strlen(argv[c])>=ADDRESS_LENGTH) terminate (STATE_UNKNOWN, "Input buffer overflow\n"); strcpy (query_address, argv[c++]); } - if (dns_server[0] == 0) { - if (is_host (argv[c]) == FALSE) { + if (strlen(dns_server)==0 && c= ADDRESS_LENGTH) + if (strlen(argv[c]) >= ADDRESS_LENGTH) terminate (STATE_UNKNOWN, "Input buffer overflow\n"); strcpy (dns_server, argv[c++]); } -- 2.30.2