dhcp_parse_reply: return ERR_VAL instead of asserting on offset-out-of-pbuf

This commit is contained in:
goldsimon 2017-03-30 22:30:27 +02:00
parent 1c57c84200
commit 33466ee6a8

View File

@ -1616,7 +1616,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. */