3 @@ -66,6 +66,7 @@ extern int SIZE_BUF;
10 #include <sys/resource.h>
11 @@ -625,6 +626,7 @@ main(int argc, char **argv)
12 #ifdef HAVE_PCAP_FINDALLDEVS
13 pcap_if_t *devpointer;
19 @@ -775,7 +777,8 @@ main(int argc, char **argv)
20 * It can be useful on Windows, where more than
21 * one interface can have the same name.
23 - if ((devnum = atoi(optarg)) != 0) {
24 + for (devp = optarg; *devp && isdigit(*devp); devp++);
25 + if ((!*devp || isspace(*devp)) && (devnum = atoi(optarg)) != 0) {
27 error("Invalid adapter index");