Ensure a minimum packet length before creating a mbuf in if_ure.
Sponsored by: Mellanox Technologies // NVIDIA Networking
This commit is contained in:
parent
226f43e757
commit
7d0368ee34
@ -711,7 +711,7 @@ ure_bulk_read_callback(struct usb_xfer *xfer, usb_error_t error)
|
||||
goto tr_setup;
|
||||
}
|
||||
|
||||
if (len != 0)
|
||||
if (len >= (ETHER_HDR_LEN + ETHER_CRC_LEN))
|
||||
m = ure_makembuf(pc, off, len - ETHER_CRC_LEN);
|
||||
else
|
||||
m = NULL;
|
||||
|
Loading…
Reference in New Issue
Block a user