diff --git a/src/app/TCPClient.cpp b/src/app/TCPClient.cpp index 71fde85..0cd33ba 100644 --- a/src/app/TCPClient.cpp +++ b/src/app/TCPClient.cpp @@ -77,6 +77,6 @@ void TCPClient::freeDataBuffer(uint16_t size) #endif } - strcpy((char *)_data, (char *)_data + secureSize); + memmove(_data, _data + secureSize, _dataSize - secureSize + 1 /*We do not forget to copy the \0 at then end*/); _dataSize -= secureSize; }