mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2024-12-27 15:16:03 +00:00
fix bug #52976: lwip_ioctl() FIONREAD crash
This commit is contained in:
parent
05ba509e33
commit
93f9c56c32
@ -3726,7 +3726,7 @@ lwip_ioctl(int s, long cmd, void *argp)
|
|||||||
|
|
||||||
/* Check if there is data left from the last recv operation. /maq 041215 */
|
/* Check if there is data left from the last recv operation. /maq 041215 */
|
||||||
if (sock->lastdata.netbuf) {
|
if (sock->lastdata.netbuf) {
|
||||||
if (NETCONNTYPE_GROUP(netconn_type(sock->conn)) != NETCONN_TCP) {
|
if (NETCONNTYPE_GROUP(netconn_type(sock->conn)) == NETCONN_TCP) {
|
||||||
recv_avail += sock->lastdata.pbuf->tot_len;
|
recv_avail += sock->lastdata.pbuf->tot_len;
|
||||||
} else {
|
} else {
|
||||||
recv_avail += sock->lastdata.netbuf->p->tot_len;
|
recv_avail += sock->lastdata.netbuf->p->tot_len;
|
||||||
|
Loading…
Reference in New Issue
Block a user