lwip-devel
[Top][All Lists]
Advanced

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

Re: [lwip-devel] Problem with LWIP_ERROR in pbuf_header(..)


From: Kieran Mansley
Subject: Re: [lwip-devel] Problem with LWIP_ERROR in pbuf_header(..)
Date: Tue, 28 Apr 2009 08:42:33 +0100

On Mon, 2009-04-27 at 20:39 +0200, address@hidden wrote:
> Justs an additional explanation: the ASSERT can (or should) only fail 
> due to wrong configuration options (i.e. PBUF_POOL data size is too 
> small to hold all the headers). We could discuss whether this should 
> assert or not, but if not these problems would be harder to detect (you 
> would have to debug why packets that are correct are rejected).

I like the assert - it has found lots of problems and so we have fixed
them - but as you say it should definitely not fire as the result of a
malformed received packet: that is up to the caller (i.e. tcp_receive())
to check and protect against.

I missed that tcp_receive() is checking p->tot_len rather than p->len.
It should be easy to add a p->len check too.  This is a bug and deserves
filing on savannah.

Kieran





reply via email to

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