mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2024-12-28 09:19:53 +00:00
Fixed bug #34733 Null pointer exception with SOCKET_DEBUG.
This commit is contained in:
parent
7aa7c0f481
commit
d12e742373
@ -758,10 +758,15 @@ lwip_recvfrom(int s, void *mem, size_t len, int flags,
|
|||||||
ipX_addr_debug_print(NETCONNTYPE_ISIPV6(netconn_type(sock->conn)),
|
ipX_addr_debug_print(NETCONNTYPE_ISIPV6(netconn_type(sock->conn)),
|
||||||
SOCKETS_DEBUG, fromaddr);
|
SOCKETS_DEBUG, fromaddr);
|
||||||
LWIP_DEBUGF(SOCKETS_DEBUG, (" port=%"U16_F" len=%d\n", port, off));
|
LWIP_DEBUGF(SOCKETS_DEBUG, (" port=%"U16_F" len=%d\n", port, off));
|
||||||
if (*fromlen > saddr.sa.sa_len) {
|
#if SOCKETS_DEBUG
|
||||||
*fromlen = saddr.sa.sa_len;
|
if (from && fromlen)
|
||||||
|
#endif /* SOCKETS_DEBUG */
|
||||||
|
{
|
||||||
|
if (*fromlen > saddr.sa.sa_len) {
|
||||||
|
*fromlen = saddr.sa.sa_len;
|
||||||
|
}
|
||||||
|
MEMCPY(from, &saddr, *fromlen);
|
||||||
}
|
}
|
||||||
MEMCPY(from, &saddr, *fromlen);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user