My fork
Dependencies: BLE_API nRF51822-bluetooth-mdw
Fork of microbit-dal by
Diff: source/bluetooth/MicroBitUARTService.cpp
- Revision:
- 8:ec4465853952
- Parent:
- 3:d86a4ddc1867
- Child:
- 29:62f8b007debf
diff -r a4042bbb7f8b -r ec4465853952 source/bluetooth/MicroBitUARTService.cpp --- a/source/bluetooth/MicroBitUARTService.cpp Thu Apr 07 23:39:33 2016 +0100 +++ b/source/bluetooth/MicroBitUARTService.cpp Thu Apr 07 23:39:34 2016 +0100 @@ -256,6 +256,8 @@ uint8_t temp[size]; + memclr(&temp, size); + circularCopy(txBuffer, txBufferSize, temp, txBufferTail, txBufferHead); #if CONFIG_ENABLED(MICROBIT_DBG) @@ -361,6 +363,8 @@ { uint8_t buf[len + 1]; + memclr(&buf, len + 1); + int ret = read(buf, len, mode); if(ret < 1) @@ -428,6 +432,8 @@ uint8_t localBuff[localBuffSize + 1]; + memclr(&localBuff, localBuffSize + 1); + circularCopy(rxBuffer, rxBufferSize, localBuff, preservedTail, foundIndex); //plus one for the character we listened for...