Loading ares/acountry.c +4 −3 Original line number Diff line number Diff line Loading @@ -523,7 +523,8 @@ static int is_addr(char *str, char **end) { int a0, a1, a2, a3, num, rc = 0, length = 0; if ((num = sscanf(str,"%3d.%3d.%3d.%3d%n",&a0,&a1,&a2,&a3,&length)) == 4 && num = sscanf(str,"%3d.%3d.%3d.%3d%n",&a0,&a1,&a2,&a3,&length); if( (num == 4) && BYTE_OK(a0) && BYTE_OK(a1) && BYTE_OK(a2) && BYTE_OK(a3) && length >= (3+4)) { Loading Loading @@ -583,8 +584,8 @@ static void find_country_from_cname(const char *cname, struct in_addr addr) if (ver_1) { ccode_A2[0] = tolower(cname[2]); ccode_A2[1] = tolower(cname[3]); ccode_A2[0] = (char)tolower(cname[2]); ccode_A2[1] = (char)tolower(cname[3]); ccode_A2[2] = '\0'; } else Loading ares/adig.c +2 −1 Original line number Diff line number Diff line Loading @@ -57,6 +57,7 @@ #include "ares.h" #include "ares_dns.h" #include "inet_ntop.h" #include "inet_net_pton.h" #include "ares_getopt.h" #ifndef HAVE_STRDUP Loading Loading @@ -213,7 +214,7 @@ int main(int argc, char **argv) case 's': /* Add a server, and specify servers in the option mask. */ if (inet_pton(AF_INET, optarg, &inaddr) <= 0) if (ares_inet_pton(AF_INET, optarg, &inaddr) <= 0) { hostent = gethostbyname(optarg); if (!hostent || hostent->h_addrtype != AF_INET) Loading Loading
ares/acountry.c +4 −3 Original line number Diff line number Diff line Loading @@ -523,7 +523,8 @@ static int is_addr(char *str, char **end) { int a0, a1, a2, a3, num, rc = 0, length = 0; if ((num = sscanf(str,"%3d.%3d.%3d.%3d%n",&a0,&a1,&a2,&a3,&length)) == 4 && num = sscanf(str,"%3d.%3d.%3d.%3d%n",&a0,&a1,&a2,&a3,&length); if( (num == 4) && BYTE_OK(a0) && BYTE_OK(a1) && BYTE_OK(a2) && BYTE_OK(a3) && length >= (3+4)) { Loading Loading @@ -583,8 +584,8 @@ static void find_country_from_cname(const char *cname, struct in_addr addr) if (ver_1) { ccode_A2[0] = tolower(cname[2]); ccode_A2[1] = tolower(cname[3]); ccode_A2[0] = (char)tolower(cname[2]); ccode_A2[1] = (char)tolower(cname[3]); ccode_A2[2] = '\0'; } else Loading
ares/adig.c +2 −1 Original line number Diff line number Diff line Loading @@ -57,6 +57,7 @@ #include "ares.h" #include "ares_dns.h" #include "inet_ntop.h" #include "inet_net_pton.h" #include "ares_getopt.h" #ifndef HAVE_STRDUP Loading Loading @@ -213,7 +214,7 @@ int main(int argc, char **argv) case 's': /* Add a server, and specify servers in the option mask. */ if (inet_pton(AF_INET, optarg, &inaddr) <= 0) if (ares_inet_pton(AF_INET, optarg, &inaddr) <= 0) { hostent = gethostbyname(optarg); if (!hostent || hostent->h_addrtype != AF_INET) Loading