From: Willem Toorop Date: Mon, 17 Oct 2011 14:42:08 +0000 (+0000) Subject: Check type of -V option to be a number X-Git-Tag: release-1.6.12~57 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c51561b3324b6afd7ef9198c2b786aa092e55ee2;p=thirdparty%2Fldns.git Check type of -V option to be a number --- diff --git a/drill/drill.c b/drill/drill.c index abd0ff63..9077cd69 100644 --- a/drill/drill.c +++ b/drill/drill.c @@ -221,6 +221,10 @@ main(int argc, char *argv[]) break; #endif /* HAVE_SSL */ case 'V': + if (strtok(optarg, "0123456789") != NULL) { + fprintf(stderr, "-V expects an number as an argument.\n"); + exit(EXIT_FAILURE); + } verbosity = atoi(optarg); break; case 'Q':