check if eth rx packet is overflow
This commit is contained in:
4
class/vendor/net/usbh_asix.c
vendored
4
class/vendor/net/usbh_asix.c
vendored
@@ -711,6 +711,10 @@ find_class:
|
||||
USB_LOG_ERR("No memory to alloc pbuf for asix rx\r\n");
|
||||
}
|
||||
} else {
|
||||
if (g_asix_rx_length > CONFIG_USBHOST_ASIX_ETH_MAX_SEGSZE) {
|
||||
USB_LOG_ERR("Rx packet is overflow\r\n");
|
||||
g_asix_rx_length = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
// clang-format off
|
||||
|
||||
4
class/vendor/net/usbh_rtl8152.c
vendored
4
class/vendor/net/usbh_rtl8152.c
vendored
@@ -2199,6 +2199,10 @@ find_class:
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (g_rtl8152_rx_length > CONFIG_USBHOST_RTL8152_ETH_MAX_RX_SEGSZE) {
|
||||
USB_LOG_ERR("Rx packet is overflow\r\n");
|
||||
g_rtl8152_rx_length = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
// clang-format off
|
||||
|
||||
Reference in New Issue
Block a user