Ignore:
Timestamp:
11/07/08 03:28:26 (4 years ago)
Author:
wd
Message:

Fix various dumbnesses in the DNS code and the way the ircd module uses it.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/ithildin-1.1/modules/dns/packet.c

    r736 r822  
    295295    last_rr = NULL; 
    296296    while (count) { 
    297         drp = malloc(sizeof(struct dns_rr)); 
     297        drp = calloc(1, sizeof(struct dns_rr)); 
    298298 
    299299        if ((rc = dn_expand(pkt, pkt + plen, pkt + pidx, drp->name, 
     
    323323            /* Fill in the data.  We do a copy over first, and if we need to 
    324324             * realloc and make changes below we do that too */ 
    325             drp->rdata.txt = malloc(drp->rdlen); 
     325            drp->rdata.txt = calloc(1, drp->rdlen); 
    326326            memcpy(drp->rdata.txt, rdata, drp->rdlen); 
    327327            switch (drp->type) { 
Note: See TracChangeset for help on using the changeset viewer.