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:
goldsimon 2007-06-21 19:58:31 +00:00
parent f49fc35f55
commit 065b8c945b

View File

@ -539,6 +539,8 @@ lwip_sendto(int s, const void *data, int size, unsigned int flags,
#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)) &&
((tolen != sizeof(struct sockaddr_in)) ||
((((struct sockaddr_in *)to)->sin_family) != AF_INET))),