ec0051a569
The current logic in the DNS resolution code allocates an address buffer based on the number of addresses in the response packet. If we receive multiple response packets in response to a single query packet, this means that we will reallocate a new buffer large enough for only the addresses in that specific packet, discarding any previous results in the process. Worse, we still keep track of the *total* number of addresses resolved in response to this query, not merely the number in the packet being currently processed. Use realloc() rather than malloc() to avoid overwriting the existing data, and allocate a buffer large enough for the total set of addresses rather than merely the number in this specific response. |
||
---|---|---|
.. | ||
drivers | ||
arp.c | ||
bootp.c | ||
dns.c | ||
ethernet.c | ||
http.c | ||
icmp.c | ||
icmp6.c | ||
ip.c | ||
net.c | ||
netbuff.c | ||
tcp.c | ||
tftp.c | ||
udp.c |