svn commit: r368801 - head/sys/dev/usb/net
Hans Petter Selasky <[email protected]> Sat, 19 Dec 2020 11:03:54 +0000 (UTC)
| Newsgroups | gmane.os.freebsd.devel.cvs |
|---|---|
| Message-ID | <202012191103.0BJB3sqJ057970__13179.7994648636$1608375842$gmane$org@repo.freebsd.org> |
Author: hselasky Date: Sat Dec 19 11:03:54 2020 New Revision: 368801 URL: https://svnweb.freebsd.org/changeset/base/368801 Log: Ensure a minimum packet length before creating a mbuf in if_ure. Sponsored by: Mellanox Technologies // NVIDIA Networking Modified: head/sys/dev/usb/net/if_ure.c Modified: head/sys/dev/usb/net/if_ure.c ============================================================================== --- head/sys/dev/usb/net/if_ure.c Sat Dec 19 11:03:04 2020 (r368800) +++ head/sys/dev/usb/net/if_ure.c Sat Dec 19 11:03:54 2020 (r368801) @@ -711,7 +711,7 @@ ure_bulk_read_callback(struct usb_xfer *xfer, usb_erro 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; _______________________________________________ [email protected] mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "[email protected]"