lwip-devel
[Top][All Lists]
Advanced

[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:1.8.0.12) Gecko/20070530 Fedora/1.5.0.12-1.fc5 Firefox/1.5.0.12

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 */
    return;
  }

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:

  <http://savannah.nongnu.org/patch/?6369>

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





reply via email to

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