Skip to content

Commit caeded5

Browse files
authored
Fix bug with larger USB packets being discarded
1 parent 73fa9aa commit caeded5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

hw/arm/prusa/stm32f407/stm32f4xx_usb.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -1669,7 +1669,7 @@ static void STM32F4xx_handle_packet(STM32F4xxUSBState *s, uint32_t devadr, USBDe
16691669
}
16701670

16711671
if (p->packet.status == USB_RET_SUCCESS) {
1672-
if (actual > tlen) {
1672+
if (actual > tlen*hctsiz->PKTCNT) {
16731673
p->packet.status = USB_RET_BABBLE;
16741674
goto babble;
16751675
}

0 commit comments

Comments
 (0)