mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2024-11-16 14:11:02 +00:00
dhcp_parse_reply: return ERR_VAL instead of asserting on offset-out-of-pbuf
(cherry picked from commit 33466ee6a8
)
This commit is contained in:
parent
aecb1b9eb0
commit
56a295f0a0
@ -1617,7 +1617,7 @@ decode_next:
|
|||||||
offset_max -= q->len;
|
offset_max -= q->len;
|
||||||
if ((offset < offset_max) && offset_max) {
|
if ((offset < offset_max) && offset_max) {
|
||||||
q = q->next;
|
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;
|
options = (u8_t*)q->payload;
|
||||||
} else {
|
} else {
|
||||||
/* We've run out of bytes, probably no end marker. Don't proceed. */
|
/* We've run out of bytes, probably no end marker. Don't proceed. */
|
||||||
|
Loading…
Reference in New Issue
Block a user