mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2025-01-30 15:52:12 +01:00
usb cdc: only pass valid bytes from USB rx up to com layer
Previously, up to 63 random bytes would be passed to the COM layer and would be delivered to the application as though the far end had sent them.
This commit is contained in:
parent
f54c0552ce
commit
86aead52ce
@ -481,7 +481,7 @@ static void PIOS_USB_COM_CDC_DATA_EP_OUT_Callback(void)
|
||||
bool need_yield = false;
|
||||
(usb_com_dev->rx_in_cb)(usb_com_dev->rx_in_context,
|
||||
usb_com_dev->rx_packet_buffer,
|
||||
sizeof(usb_com_dev->rx_packet_buffer),
|
||||
DataLength,
|
||||
&headroom,
|
||||
&need_yield);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user