vaseboot/grub-core/net
Matthew Garrett 3340fc72a6 Don't allocate a new address buffer if we receive multiple responses
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.
2018-03-29 22:18:53 -04:00
..
drivers ofnet: implement the receive buffer 2016-12-14 14:13:34 +01:00
arp.c net: trivial grub_cpu_to_XX_compile_time cleanup 2015-03-27 18:58:57 +03:00
bootp.c Tag the bootp request as a DHCP discover 2018-03-29 22:18:53 -04:00
dns.c Don't allocate a new address buffer if we receive multiple responses 2018-03-29 22:18:53 -04:00
ethernet.c Add gcc_struct to all packed structures when compiling with mingw. 2013-12-15 14:14:30 +01:00
http.c Allow non-default ports for HTTP requests 2018-03-29 22:18:53 -04:00
icmp.c arp, icmp: Fix handling in case of oversized or invalid packets. 2015-03-27 12:18:25 +01:00
icmp6.c net: fix ipv6 routing 2016-02-25 22:38:52 +03:00
ip.c net/ip: Fix limit_time calculation in freeing old fragments 2016-10-18 20:26:42 +03:00
net.c Allow protocol to be separated from host with a semicolon 2018-03-29 22:18:53 -04:00
netbuff.c arp, icmp: Fix handling in case of oversized or invalid packets. 2015-03-27 12:18:25 +01:00
tcp.c tcp: fix memory leaks 2016-01-16 20:59:50 +03:00
tftp.c tftp: fix memory leaks in open 2016-01-16 21:27:57 +03:00
udp.c * grub-core/disk/ahci.c: Add needed explicit cast. 2013-08-21 21:02:14 +02:00