Skip to content

Commit b96b7cf

Browse files
committed
Fixed illegal memory access bug. Whoops!
Thanks to Joel and Vini for emailing me about it/
1 parent 2c04541 commit b96b7cf

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

EasyTransfer/EasyTransfer.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ void EasyTransfer::begin(uint8_t * ptr, uint8_t length, Stream *theStream){
1010
_stream = theStream;
1111

1212
//dynamic creation of rx parsing buffer in RAM
13-
rx_buffer = (uint8_t*) malloc(size);
13+
rx_buffer = (uint8_t*) malloc(size+1);
1414
}
1515

1616
//Sends out struct in binary, with header, length info and checksum
@@ -84,4 +84,4 @@ boolean EasyTransfer::receiveData(){
8484
}
8585

8686
return false;
87-
}
87+
}

0 commit comments

Comments
 (0)