buglwIP - A Lightweight TCP/IP stack - Bugs: bug #26722, Must zero all fields.

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #26722: Must zero all fields.

Submitter:  Powe Nui <pwn>
Submitted:  Tue 02 Jun 2009 11:51:15 AM UTC
   
 
Category:  sockets/netconn Severity:  3 - Normal
Item Group:  Crash Error Status:  Fixed
Privacy:  Public Assigned to:  None
Open/Closed:  Closed Planned Release:  None
lwIP version:  CVS Head

Thu 25 Jun 2009 10:17:26 AM UTC, comment #1: 

Fixed.  I also set write_delayed as that seemed to be related, and moved all these to be only present in the structure and code if LWIP_TCP was set.

Kieran Mansley <kieranm>
Group Member
Tue 02 Jun 2009 11:51:15 AM UTC, original submission:  

There is a bug.
The write_msg and write_offset are not zeroed.

The bug takes place randomly after many time.
It crashes on LWIP_ASSERT in api_msg.c.

The fix:
In api_msg.c:

Before:
conn->socket    = -1;
conn->callback  = callback;
conn->recv_avail = 0;

After:
conn->socket    = -1;
conn->callback  = callback;
conn->write_msg   = NULL; /* !!! */
conn->write_offset= 0; /* !!! */
conn->recv_avail = 0;


Thank you for you attention.

Powe Nui <pwn>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by kieranm (Posted a comment)
  • -email is unavailable- added by pwn (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

     

    Follow 2 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2009-06-25 kieranm StatusNone Fixed
        Open/ClosedOpen Closed

    Back to the top

    Powered by Savane 3.13-d3ae.
    Corresponding source code