[Top][All Lists]

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

[lwip-devel] [patch #6369] ip_input : checking before realloc

From: Jonathan Larmour
Subject: [lwip-devel] [patch #6369] ip_input : checking before realloc
Date: Fri, 11 Jan 2008 13:49:13 +0000
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv: Gecko/20070530 Fedora/ Firefox/

Follow-up Comment #1, patch #6369 (project lwip):

Something doesn't seem right here - pbuf_realloc shouldn't crash because
right at the start it does:
  if (new_len >= p->tot_len) {
    /* enlarging not yet supported */

Worst case the pbuf isn't trimmed.

And if we did want to make a check like this, it could be merged into the
header length check to save code. (You could just retest to get the desired
LWIP_DEBUGF message - but duplicated test is ok given that that code would be
optimised away by the compiler when lwIP debugging is off).


Reply to this item at:


  Message sent via/by Savannah

reply via email to

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