From 56a295f0a0c6f20862e9b75477aa049b1ae8c214 Mon Sep 17 00:00:00 2001 From: goldsimon Date: Thu, 30 Mar 2017 22:30:27 +0200 Subject: [PATCH] dhcp_parse_reply: return ERR_VAL instead of asserting on offset-out-of-pbuf (cherry picked from commit 33466ee6a89ec37c62c0febea55caa5e3384c612) --- src/core/ipv4/dhcp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/ipv4/dhcp.c b/src/core/ipv4/dhcp.c index dd354710..f7f80f9a 100644 --- a/src/core/ipv4/dhcp.c +++ b/src/core/ipv4/dhcp.c @@ -1617,7 +1617,7 @@ decode_next: offset_max -= q->len; if ((offset < offset_max) && offset_max) { q = q->next; - LWIP_ASSERT("next pbuf was null", q); + LWIP_ERROR("next pbuf was null", q != NULL, return ERR_VAL;); options = (u8_t*)q->payload; } else { /* We've run out of bytes, probably no end marker. Don't proceed. */