1
0
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:
Stacey Sheldon 2011-12-25 17:58:37 -05:00
parent f54c0552ce
commit 86aead52ce

View File

@ -481,7 +481,7 @@ static void PIOS_USB_COM_CDC_DATA_EP_OUT_Callback(void)
bool need_yield = false; bool need_yield = false;
(usb_com_dev->rx_in_cb)(usb_com_dev->rx_in_context, (usb_com_dev->rx_in_cb)(usb_com_dev->rx_in_context,
usb_com_dev->rx_packet_buffer, usb_com_dev->rx_packet_buffer,
sizeof(usb_com_dev->rx_packet_buffer), DataLength,
&headroom, &headroom,
&need_yield); &need_yield);