]> The Tcpdump Group git mirrors - tcpdump/commitdiff
Cast argument to isdigit to unsigned char, so if the characters 8th bit
authorGuy Harris <[email protected]>
Thu, 2 Jul 2009 19:00:55 +0000 (12:00 -0700)
committerGuy Harris <[email protected]>
Thu, 2 Jul 2009 19:00:55 +0000 (12:00 -0700)
is set, it doesn't get treated as a negative number.

missing/getaddrinfo.c

index f59b2c4ef36570126997c40ce42df44adc0b335a..d74d5bcaaec82ff00f22048516d43e347c5484e6 100644 (file)
@@ -278,7 +278,7 @@ str_isnumber(p)
 {
        char *q = (char *)p;
        while (*q) {
-               if (! isdigit(*q))
+               if (! isdigit((unsigned char)*q))
                        return NO;
                q++;
        }