grub/grub-core/net
Matthew Garrett ec0051a569 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.
2016-03-24 13:46:42 -07:00
..
drivers ofnet: Do not set SUFFIX for sun4v network devices 2015-10-07 20:00:52 +03:00
arp.c net: trivial grub_cpu_to_XX_compile_time cleanup 2015-03-27 18:58:57 +03:00
bootp.c Send a user class identifier in bootp requests 2016-01-08 14:25:52 -08:00
dns.c Don't allocate a new address buffer if we receive multiple responses 2016-03-24 13:46:42 -07: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 2016-01-07 17:27:15 -08: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: trivial grub_cpu_to_XX_compile_time cleanup 2015-03-27 18:58:57 +03:00
ip.c net/ip: check result of grub_netbuff_push 2015-01-30 22:09:51 +03:00
net.c Allow non-default ports for HTTP requests 2016-01-07 17:27:15 -08: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: ack when we get an OOO/lost packet 2015-12-07 20:52:27 +03:00
tftp.c cleanup: grub_cpu_to_XXX_compile_time for constants 2014-09-22 20:47:10 +04:00
udp.c * grub-core/disk/ahci.c: Add needed explicit cast. 2013-08-21 21:02:14 +02:00