[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lwip-devel] [bug #27034] Invalid ASSERT in pbuf_alloc()

From: Iordan Neshev
Subject: [lwip-devel] [bug #27034] Invalid ASSERT in pbuf_alloc()
Date: Thu, 16 Jul 2009 07:09:30 +0000
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv: Gecko/2009042316 Firefox/3.0.10

Follow-up Comment #6, bug #27034 (project lwip):

>As said on lwip-devel, I'd just change the assert for releasing 
>1.3.1 and think about the PPP code after the release. 

OK, we agreed that using zero-length pbufs from
PPP is bad, but at least it works and does not crash. While we can close our
eyes for PPP until 1.3.1 release, how about the other uses in the upper layers
of the stack? I mean:

buf->p = pbuf_alloc(PBUF_TRANSPORT, 0, PBUF_REF);

p = pbuf_alloc(PBUF_TRANSPORT, 0, PBUF_REF);

q = pbuf_alloc(PBUF_IP, 0, PBUF_RAM);

rambuf = pbuf_alloc(PBUF_LINK, 0, PBUF_REF); // line 656
newpbuf = pbuf_alloc(PBUF_RAW, 0, PBUF_REF); // line 721
header = pbuf_alloc(PBUF_LINK, 0, PBUF_RAM); // line 755

>You should know the length before calling pbuf_alloc() and pass >it instead
of 0.

Obviously the authors of the mentioned lines intentionally created
zero-length pbufs. Is this illegal use?


Reply to this item at:


  Message sent via/by Savannah

reply via email to

[Prev in Thread] Current Thread [Next in Thread]