test

Dependencies:   BLE_API mbed-dev-bin nRF51822

Fork of microbit-dal by Lancaster University

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...