]> git.ipfire.org Git - thirdparty/ldns.git/commitdiff
Check type of -V option to be a number
authorWillem Toorop <willem@NLnetLabs.nl>
Mon, 17 Oct 2011 14:42:08 +0000 (14:42 +0000)
committerWillem Toorop <willem@NLnetLabs.nl>
Mon, 17 Oct 2011 14:42:08 +0000 (14:42 +0000)
drill/drill.c

index abd0ff630038a4166f5a055b0eb33ea66d83fcff..9077cd69bfb33fa6e6449efde0acc88e5ac68b33 100644 (file)
@@ -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':