lwip-devel
[Top][All Lists]
Advanced

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

[lwip-devel] [bug #19443] pcb allocations in api_msg are not always chec


From: Frédéric Bernon
Subject: [lwip-devel] [bug #19443] pcb allocations in api_msg are not always checked (and code is redundant)
Date: Thu, 29 Mar 2007 12:38:35 +0000
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; fr; rv:1.8.1.3) Gecko/20070309 Firefox/2.0.0.3

URL:
  <http://savannah.nongnu.org/bugs/?19443>

                 Summary: pcb allocations in api_msg are not always checked
(and code is redundant)
                 Project: lwIP - A Lightweight TCP/IP stack
            Submitted by: fbernon
            Submitted on: jeudi 29.03.2007 à 14:38
                Category: None
                Severity: 3 - Normal
              Item Group: Crash Error
                  Status: None
                 Privacy: Public
             Assigned to: fbernon
             Open/Closed: Open
         Discussion Lock: Any

    _______________________________________________________

Details:

If you look do_newconn, do_bind, and do_connect, you will see that there is
lot of redundant code: we alloc a pcb if it doesn't exist before. More, most
of "xxx_new" are not checked (in do_bind, and for raw_new), and can cause a
crash. I propose to add a new function named do_newpcb which return ERR_MEM
if there is an error, and to use it in do_newconn, do_bind, and do_connect.
Footprint will be reduced, checking "xx_new" will be done once time, and
maintain or review this file will be simpler.

I prepare a patch for that...





    _______________________________________________________

Reply to this item at:

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

_______________________________________________
  Message posté via/par Savannah
  http://savannah.nongnu.org/





reply via email to

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