Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: BLE_API mbed-dev-bin nRF51822
Fork of microbit-dal by
Diff: source/drivers/MicroBitSerial.cpp
- Revision:
- 8:ec4465853952
- Parent:
- 6:2e1c2e0d8c7a
- Child:
- 22:23d7b9a4b082
--- a/source/drivers/MicroBitSerial.cpp Thu Apr 07 23:39:33 2016 +0100
+++ b/source/drivers/MicroBitSerial.cpp Thu Apr 07 23:39:34 2016 +0100
@@ -567,6 +567,8 @@
{
uint8_t buff[size + 1];
+ memclr(&buff, size + 1);
+
int returnedSize = read((uint8_t *)buff, size, mode);
if(returnedSize <= 0)
@@ -758,6 +760,8 @@
uint8_t localBuff[localBuffSize + 1];
+ memclr(&localBuff, localBuffSize + 1);
+
circularCopy(rxBuff, rxBuffSize, localBuff, preservedTail, foundIndex);
//plus one for the character we listened for...
