mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2024-11-19 23:12:09 +00:00
Added ASSERT to check that lwip_send(to) is not called for length not fitting into u16_t (for UDP & RAW sockets)
This commit is contained in:
parent
f49fc35f55
commit
065b8c945b
@ -539,6 +539,8 @@ lwip_sendto(int s, const void *data, int size, unsigned int flags,
|
|||||||
#endif /* LWIP_TCP */
|
#endif /* LWIP_TCP */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
LWIP_ASSERT("lwip_sendto: size must fit in u16_t",
|
||||||
|
((size >= 0) && (size <= 0xffff)));
|
||||||
LWIP_ERROR("lwip_sendto: invalid address", (((to != NULL) || (tolen != 0)) &&
|
LWIP_ERROR("lwip_sendto: invalid address", (((to != NULL) || (tolen != 0)) &&
|
||||||
((tolen != sizeof(struct sockaddr_in)) ||
|
((tolen != sizeof(struct sockaddr_in)) ||
|
||||||
((((struct sockaddr_in *)to)->sin_family) != AF_INET))),
|
((((struct sockaddr_in *)to)->sin_family) != AF_INET))),
|
||||||
|
Loading…
Reference in New Issue
Block a user