diff options
| author | Dean <Dean@d5102386-fcda-11dd-9fdb-3debd5008f28> | 2010-07-15 04:45:31 +0000 |
|---|---|---|
| committer | Dean <Dean@d5102386-fcda-11dd-9fdb-3debd5008f28> | 2010-07-15 04:45:31 +0000 |
| commit | a1ffc53e4e76b56d295e76fd9a8c2b95952693f8 (patch) | |
| tree | d2c55277afd52537fafd198f4755d72ccf5dbc2c /Projects/XPLAINBridge/XPLAINBridge.c | |
| parent | a0056f6ef2b36eedc2e717406283b4aa2b6fd32e (diff) | |
Fixed possible buffer overrun in the XPLAINBridge project when in serial bridge mode.
git-svn-id: http://lufa-lib.googlecode.com/svn/trunk@1388 d5102386-fcda-11dd-9fdb-3debd5008f28
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 f08dfc5c..3bbc0bc6 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 */ |
