]> git.ipfire.org Git - thirdparty/ldns.git/commitdiff
another efence trigger mem thingy found
authorMiek Gieben <miekg@NLnetLabs.nl>
Wed, 16 Mar 2005 11:51:01 +0000 (11:51 +0000)
committerMiek Gieben <miekg@NLnetLabs.nl>
Wed, 16 Mar 2005 11:51:01 +0000 (11:51 +0000)
net.c

diff --git a/net.c b/net.c
index 613599734b2b4dbce011905af98f62790d17ecfa..6340fe6a996b5bd7e271e480d4294b7d38d4a885 100644 (file)
--- a/net.c
+++ b/net.c
@@ -177,7 +177,8 @@ ldns_send_udp(ldns_buffer *qbin, const struct sockaddr_storage *to, socklen_t to
        }
        
        /* wait for an response*/
-       answer = XMALLOC(uint8_t, MAX_PACKETLEN);
+       /*answer = XMALLOC(uint8_t, MAX_PACKETLEN);*/
+       answer = (uint8_t*) malloc(MAX_PACKETLEN);
        if (!answer) {
                printf("respons alloc error\n");
                return NULL;
@@ -197,7 +198,7 @@ ldns_send_udp(ldns_buffer *qbin, const struct sockaddr_storage *to, socklen_t to
        }
        
        /* resize accordingly */
-       XREALLOC(answer, uint8_t *, (size_t) bytes);
+       answer = XREALLOC(answer, uint8_t *, (size_t) bytes);
 
         if (ldns_wire2pkt(&answer_pkt, answer, (size_t) bytes) != 
                        LDNS_STATUS_OK) {