buglwIP - A Lightweight TCP/IP stack - Bugs: bug #52976, lwip_ioctl() FIONREAD crash.

 
 

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

bug #52976: lwip_ioctl() FIONREAD crash.

Submitter:  hanhui <hanhui03>
Submitted:  Fri 26 Jan 2018 10:21:18 AM UTC
   
 
Category:  sockets/netconn Severity:  3 - Normal
Item Group:  Crash Error Status:  Fixed
Privacy:  Public Assigned to:  goldsimon
Open/Closed:  Closed Planned Release:  None
lwIP version:  git head

Sat 27 Jan 2018 01:45:53 PM UTC, comment #1: 

Fixed, thanks for reporting.

Simon Goldschmidt <goldsimon>
Group administrator
Fri 26 Jan 2018 10:21:18 AM UTC, original submission:  

int
lwip_ioctl(int s, long cmd, void *argp)
{
  ...
  case FIONREAD:
  ...
  /* Check if there is data left from the last recv operation. /maq 041215 */
  if (sock->lastdata.netbuf) {
    if (NETCONNTYPE_GROUP(netconn_type(sock->conn)) != NETCONN_TCP) {
      recv_avail += sock->lastdata.pbuf->tot_len;
    } else {
      recv_avail += sock->lastdata.netbuf->p->tot_len;
    }
  }
  should be:
  /* Check if there is data left from the last recv operation. /maq 041215 */
  if (sock->lastdata.netbuf) {
    if (NETCONNTYPE_GROUP(netconn_type(sock->conn)) != NETCONN_TCP) {
      recv_avail += sock->lastdata.netbuf->p->tot_len;
    } else {
      recv_avail += sock->lastdata.pbuf->tot_len;
    }
  }
  ...
}

Han.hui

hanhui <hanhui03>

 

(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 goldsimon (Posted a comment)
  • -email is unavailable- added by hanhui03 (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 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2018-01-27 goldsimon StatusNone Fixed
        Assigned toNone goldsimon
        Open/ClosedOpen Closed

    Back to the top

    Powered by Savane 3.13-758e.
    Corresponding source code