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.

Submitted by:  Powe Nui <pwn>
Submitted on:  Tue 02 Jun 2009 11:51:15 AM UTC  
 
Category: sockets/netconnSeverity: 3 - Normal
Item Group: Crash ErrorStatus: Fixed
Privacy: PublicAssigned to: None
Open/Closed: ClosedPlanned 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>
Project Administrator
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>

 

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

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

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 2 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Thu 25 Jun 2009 10:17:26 AM UTCkieranmStatusNone=>Fixed
      Open/ClosedOpen=>Closed

    Back to the top


    Powered by Savane 3.1-cleanup1