diff options
author | Dean Camera <[email protected]> | 2010-07-15 04:45:31 +0000 |
---|---|---|
committer | Dean Camera <[email protected]> | 2010-07-15 04:45:31 +0000 |
commit | e2e1fe5aad50809f00f6f5258432bd7aa605f47c (patch) | |
tree | d2c55277afd52537fafd198f4755d72ccf5dbc2c /Projects/XPLAINBridge/XPLAINBridge.c | |
parent | 7cef08e10e0e7ef770c52dc180b25fdfa5cf758d (diff) | |
download | qmk_firmware-e2e1fe5aad50809f00f6f5258432bd7aa605f47c.tar.gz qmk_firmware-e2e1fe5aad50809f00f6f5258432bd7aa605f47c.zip |
Fixed possible buffer overrun in the XPLAINBridge project when in serial bridge mode.
Diffstat (limited to 'Projects/XPLAINBridge/XPLAINBridge.c')
-rw-r--r-- | Projects/XPLAINBridge/XPLAINBridge.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Projects/XPLAINBridge/XPLAINBridge.c b/Projects/XPLAINBridge/XPLAINBridge.c index f08dfc5c78..3bbc0bc653 100644 --- a/Projects/XPLAINBridge/XPLAINBridge.c +++ b/Projects/XPLAINBridge/XPLAINBridge.c @@ -120,7 +120,7 @@ void UARTBridge_Task(void) return; /* Read bytes from the USB OUT endpoint into the UART transmit buffer */ - if (CDC_Device_BytesReceived(&VirtualSerial_CDC_Interface)) + if (CDC_Device_BytesReceived(&VirtualSerial_CDC_Interface) && !(RingBuffer_IsFull(&USBtoUART_Buffer))) RingBuffer_AtomicInsert(&USBtoUART_Buffer, CDC_Device_ReceiveByte(&VirtualSerial_CDC_Interface)); /* Check if the software UART flush timer has expired */ |