lwip-devel
[Top][All Lists]
Advanced

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

[lwip-devel] [bug #20478] memp_malloc returns bogus value on malloc fail


From: Thomas Taranowski
Subject: [lwip-devel] [bug #20478] memp_malloc returns bogus value on malloc failure
Date: Fri, 13 Jul 2007 17:25:52 +0000
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.4) Gecko/20070515 Firefox/2.0.0.4

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

                 Summary: memp_malloc returns bogus value on malloc failure
                 Project: lwIP - A Lightweight TCP/IP stack
            Submitted by: taranowski
            Submitted on: Friday 07/13/2007 at 17:25
                Category: None
                Severity: 3 - Normal
              Item Group: None
                  Status: None
                 Privacy: Public
             Assigned to: None
             Open/Closed: Open
         Discussion Lock: Any
         Planned Release: 

    _______________________________________________________

Details:

If malloc fails, memp_malloc needs to return a NULL value, as many places in
the code rely on this function.  


Contents of the patch - also attached
+++ memp.c      2007-07-11 11:41:49.105656200 -0700
@@ -355,6 +355,7 @@
 #if MEMP_STATS
     ++lwip_stats.memp[type].err;
 #endif /* MEMP_STATS */
+       return NULL;
   }
 
   SYS_ARCH_UNPROTECT(old_level);




    _______________________________________________________

File Attachments:


-------------------------------------------------------
Date: Friday 07/13/2007 at 17:25  Name: memp.patch  Size: 282B   By:
taranowski

<http://savannah.nongnu.org/bugs/download.php?file_id=13331>

    _______________________________________________________

Reply to this item at:

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

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





reply via email to

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