From 092c6c1f075eca8a1a043a854ff1e14ecb6a602b Mon Sep 17 00:00:00 2001 From: goldsimon Date: Mon, 26 Jun 2017 08:48:17 +0200 Subject: [PATCH] DNS_MAX_SOURCE_PORTS is PP-checked to be <= 255... --- 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 3529844d..25b295a7 100644 --- a/src/core/dns.c +++ b/src/core/dns.c @@ -913,7 +913,7 @@ dns_alloc_pcb(void) /* if we come here, creating a new UDP pcb failed, so we have to use an already existing one (so overflow is no issue) */ for (i = 0, idx = (u8_t)(dns_last_pcb_idx + 1); i < DNS_MAX_SOURCE_PORTS; i++, idx++) { - if (idx >= LWIP_MAX(0xFF, DNS_MAX_SOURCE_PORTS)) { + if (idx >= DNS_MAX_SOURCE_PORTS) { idx = 0; } if (dns_pcbs[idx] != NULL) {