mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2024-07-07 21:38:50 +00:00
Fixed bug #27034: "Invalid ASSERT in pbuf_alloc()" to prevent breaking PPP (for now).
This commit is contained in:
parent
cc4b968f0a
commit
22bcf5892a
|
@ -200,7 +200,8 @@ pbuf_alloc(pbuf_layer layer, u16_t length, pbuf_type type)
|
||||||
LWIP_ASSERT("check p->payload + p->len does not overflow pbuf",
|
LWIP_ASSERT("check p->payload + p->len does not overflow pbuf",
|
||||||
((u8_t*)p->payload + p->len <=
|
((u8_t*)p->payload + p->len <=
|
||||||
(u8_t*)p + SIZEOF_STRUCT_PBUF + PBUF_POOL_BUFSIZE_ALIGNED));
|
(u8_t*)p + SIZEOF_STRUCT_PBUF + PBUF_POOL_BUFSIZE_ALIGNED));
|
||||||
LWIP_ASSERT("PBUF_POOL_BUFSIZE must be bigger than MEM_ALIGNMENT", p->len != 0);
|
LWIP_ASSERT("PBUF_POOL_BUFSIZE must be bigger than MEM_ALIGNMENT",
|
||||||
|
(PBUF_POOL_BUFSIZE_ALIGNED - LWIP_MEM_ALIGN_SIZE(offset)) > 0 );
|
||||||
/* set reference count (needed here in case we fail) */
|
/* set reference count (needed here in case we fail) */
|
||||||
p->ref = 1;
|
p->ref = 1;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user