diff --git a/cube/User/Src/tcpTest.c b/cube/User/Src/tcpTest.c index bd51a9d..ca4ef33 100644 --- a/cube/User/Src/tcpTest.c +++ b/cube/User/Src/tcpTest.c @@ -83,6 +83,7 @@ void tcpTestHandler(void *handle) { if (res16 > 0) { uint8_t *buf = (uint8_t*) malloc(res16); + memset(buf, 0, res16); res32 = recv(TCPTEST_SOCK, buf, res16); coloredMsg(LOG_YELLOW, "tth, recv returns 0x%02x", res32); if (res32 > 0) {