From 1efd1ee6ac8dc834250102c2560dc99265105e74 Mon Sep 17 00:00:00 2001 From: Simon Goldschmidt Date: Mon, 14 Jan 2013 18:04:04 +0100 Subject: [PATCH] fixed bug #37705 Possible memory corruption in DNS query --- src/core/dns.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/dns.c b/src/core/dns.c index 4e3a7dec..90821a66 100644 --- a/src/core/dns.c +++ b/src/core/dns.c @@ -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;