mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2025-04-15 23:42:33 +00:00
fixed bug #37705 Possible memory corruption in DNS query
This commit is contained in:
parent
d12600fba0
commit
1efd1ee6ac
@ -573,7 +573,7 @@ dns_send(u8_t numdns, const char* name, u8_t id)
|
||||
LWIP_ASSERT("dns server has no IP address set", !ip_addr_isany(&dns_servers[numdns]));
|
||||
|
||||
/* if here, we have either a new query or a retry on a previous query to process */
|
||||
p = pbuf_alloc(PBUF_TRANSPORT, SIZEOF_DNS_HDR + DNS_MAX_NAME_LENGTH +
|
||||
p = pbuf_alloc(PBUF_TRANSPORT, SIZEOF_DNS_HDR + DNS_MAX_NAME_LENGTH + 1 +
|
||||
SIZEOF_DNS_QUERY, PBUF_RAM);
|
||||
if (p != NULL) {
|
||||
u16_t realloc_size;
|
||||
|
Loading…
x
Reference in New Issue
Block a user