tests: null-terminate buffer
Initialize temporary buffer with 0 to make sure that it's
null-terminated.
Change-Id: Icdde701839e35d3131605ea5a11882af21c8939a
Fixes: CID149362
diff --git a/tests/CommonLibs/SocketsTest.cpp b/tests/CommonLibs/SocketsTest.cpp
index c4e31d8..eb92e25 100644
--- a/tests/CommonLibs/SocketsTest.cpp
+++ b/tests/CommonLibs/SocketsTest.cpp
@@ -47,7 +47,7 @@
readSocket->nonblocking();
int rc = 0;
while (rc<gNumToSend) {
- char buf[MAX_UDP_LENGTH];
+ char buf[MAX_UDP_LENGTH] = { 0 };
int count = readSocket->read(buf, MAX_UDP_LENGTH);
if (count>0) {
CERR("read: " << buf);