mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2024-08-24 23:25:58 +00:00
Fixed invalid SOCK_ADDR_TYPE_MATCH check in lwip_sendto()
This commit is contained in:
parent
09ac68c196
commit
1813d11b9d
@ -864,7 +864,7 @@ lwip_sendto(int s, const void *data, size_t size, int flags,
|
|||||||
#endif /* LWIP_TCP */
|
#endif /* LWIP_TCP */
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!SOCK_ADDR_TYPE_MATCH(to, sock)) {
|
if ((to != NULL) && !SOCK_ADDR_TYPE_MATCH(to, sock)) {
|
||||||
/* sockaddr does not match socket type (IPv4/IPv6) */
|
/* sockaddr does not match socket type (IPv4/IPv6) */
|
||||||
sock_set_errno(sock, err_to_errno(ERR_VAL));
|
sock_set_errno(sock, err_to_errno(ERR_VAL));
|
||||||
return -1;
|
return -1;
|
||||||
|
Loading…
Reference in New Issue
Block a user