Fix incorrect allocation in ares_parse_ptr_reply()
authorJakub Hrozek <jhrozek@redhat.com>
Tue, 14 Jun 2011 13:56:33 +0000 (15:56 +0200)
committerJakub Hrozek <jhrozek@redhat.com>
Tue, 14 Jun 2011 14:41:29 +0000 (16:41 +0200)
ares_parse_ptr_reply.c

index ccd68a26da11a67a58027d08962c3a890ee1612e..9d5a8b564bc4de74668037e6959eb746fa267e7d 100644 (file)
@@ -118,7 +118,7 @@ int ares_parse_ptr_reply(const unsigned char *abuf, int alen, const void *addr,
           if (hostname)
             free(hostname);
           hostname = rr_data;
-          aliases[aliascnt] = malloc((strlen(rr_data)+1) * sizeof(char *));
+          aliases[aliascnt] = malloc((strlen(rr_data)+1) * sizeof(char));
           if (!aliases[aliascnt])
             {
               status = ARES_ENOMEM;