lwip-devel
[Top][All Lists]
Advanced

[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:1.9.0.10) 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:

apinetbuf.c:
buf->p = pbuf_alloc(PBUF_TRANSPORT, 0, PBUF_REF);

apisockets.c
p = pbuf_alloc(PBUF_TRANSPORT, 0, PBUF_REF);

raw.c:
q = pbuf_alloc(PBUF_IP, 0, PBUF_RAM);

ip_fraq.c:
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:

  <http://savannah.nongnu.org/bugs/?27034>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.nongnu.org/





reply via email to

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