aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--tests/CommonLibs/SocketsTest.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/CommonLibs/SocketsTest.cpp b/tests/CommonLibs/SocketsTest.cpp
index eb92e25..e4eef54 100644
--- a/tests/CommonLibs/SocketsTest.cpp
+++ b/tests/CommonLibs/SocketsTest.cpp
@@ -47,9 +47,10 @@ void *testReaderIP(void *param)
readSocket->nonblocking();
int rc = 0;
while (rc<gNumToSend) {
- char buf[MAX_UDP_LENGTH] = { 0 };
+ char buf[MAX_UDP_LENGTH+1] = { 0 };
int count = readSocket->read(buf, MAX_UDP_LENGTH);
if (count>0) {
+ buf[count] = 0;
CERR("read: " << buf);
rc++;
} else {