diff options
| author | sakumisu <[email protected]> | 2026-07-25 23:29:27 +0800 |
|---|---|---|
| committer | sakumisu <[email protected]> | 2026-07-25 23:29:27 +0800 |
| commit | af3a981a7a0be2d63b26e1db2d2ca9a437f9f679 (patch) | |
| tree | dd4648a8220e4f44e4876b0cb16cabd974464a90 | |
| parent | 23cb7a3f47e831dbaad6691314a36c1222d236f5 (diff) | |
fix(security): fix adb len check
Signed-off-by: sakumisu <[email protected]>
| -rw-r--r-- | class/adb/usbd_adb.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/class/adb/usbd_adb.c b/class/adb/usbd_adb.c index dc664309..d147834f 100644 --- a/class/adb/usbd_adb.c +++ b/class/adb/usbd_adb.c @@ -115,7 +115,7 @@ void usbd_adb_bulk_out(uint8_t busid, uint8_t ep, uint32_t nbytes) if (adb_client.common_state == ADB_STATE_READ_MSG) { USB_ASSERT(nbytes == sizeof(struct adb_msg)); - USB_ASSERT(rx_packet.msg.data_length <= sizeof(rx_packet.payload)); + USB_ASSERT(rx_packet.msg.data_length < sizeof(rx_packet.payload)); USB_LOG_DBG("command:%x arg0:%x arg1:%x len:%d\r\n", rx_packet.msg.command, |
