Hi, This is a simple attempt to avoid the following pattern:
ssize_t pkt_size = get_pkt_size(); // returns errno
// no check
send_packet(size_t size=pkt_size); // size casted to unsigned
// -> overflow
Regards,
Phil.
Philippe Mathieu-Daudé (2):
net: Do not accept packets bigger then NET_BUFSIZE
net: Assert no packet bigger than NET_BUFSIZE is queued
net/net.c | 4 ++++
net/queue.c | 7 +++++++
2 files changed, 11 insertions(+)
--
2.26.2
