Fixed bug #27034: "Invalid ASSERT in pbuf_alloc()" to prevent breaking PPP (for now).

This commit is contained in:
goldsimon 2009-07-27 15:17:13 +00:00
parent cc4b968f0a
commit 22bcf5892a

View File

@ -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",
((u8_t*)p->payload + p->len <=
(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) */
p->ref = 1;