Browse Source

lwip: removed ASSERT in dhcp as the error might occur in runtime if packet is altered

David Cermak 7 years ago
parent
commit
882ca87442
1 changed files with 1 additions and 1 deletions
  1. 1 1
      components/lwip/core/ipv4/dhcp.c

+ 1 - 1
components/lwip/core/ipv4/dhcp.c

@@ -1712,7 +1712,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("offset pointed to next pbuf which is null", q , 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. */