mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2024-11-04 14:29:39 +00:00
fixed bug #45004: dns response without answer might be discarded
This commit is contained in:
parent
d850efdd08
commit
7263cc675b
@ -249,6 +249,9 @@ HISTORY
|
||||
|
||||
++ Bugfixes:
|
||||
|
||||
2015-08-19: Simon Goldschmidt (patch by "Sandra")
|
||||
dns.c: fixed bug #45004: dns response without answer might be discarded
|
||||
|
||||
2015-08-18: Chrysn
|
||||
timers.c: patch #8704 fix sys_timeouts_sleeptime function
|
||||
|
||||
|
@ -1017,7 +1017,7 @@ dns_recv(void *arg, struct udp_pcb *pcb, struct pbuf *p, const ip_addr_t *addr,
|
||||
LWIP_UNUSED_ARG(port);
|
||||
|
||||
/* is the dns message big enough ? */
|
||||
if (p->tot_len < (SIZEOF_DNS_HDR + SIZEOF_DNS_QUERY + SIZEOF_DNS_ANSWER)) {
|
||||
if (p->tot_len < (SIZEOF_DNS_HDR + SIZEOF_DNS_QUERY)) {
|
||||
LWIP_DEBUGF(DNS_DEBUG, ("dns_recv: pbuf too small\n"));
|
||||
/* free pbuf and return */
|
||||
goto memerr;
|
||||
|
Loading…
Reference in New Issue
Block a user