Index: adig.c
===================================================================
RCS file: /cvsroot/curl/curl/ares/adig.c,v
retrieving revision 1.31
diff -r1.31 adig.c
153a154
>   struct in_addr inaddr;
191,192c192
<           hostent = gethostbyname(optarg);
<           if (!hostent || hostent->h_addrtype != AF_INET)
---
>           if (inet_pton(AF_INET, optarg, &inaddr) <= 0)
194,195c194,200
<               fprintf(stderr, "adig: server %s not found.\n", optarg);
<               return 1;
---
>               hostent = gethostbyname(optarg);
>               if (!hostent || hostent->h_addrtype != AF_INET)
>                 {
>                   fprintf(stderr, "adig: server %s not found.\n", optarg);
>                   return 1;
>                 }
>               memcpy(&inaddr, hostent->h_addr, sizeof(struct in_addr));
204c209
<           memcpy(&options.servers[options.nservers], hostent->h_addr,
---
>           memcpy(&options.servers[options.nservers], &inaddr,
