tests: null-terminate buffer

Initialize temporary buffer with 0 to make sure that it's
null-terminated.

Change-Id: Icdde701839e35d3131605ea5a11882af21c8939a
Fixes: CID149362
changes/13/6213/1
Maxim Suraev 5 years ago
parent 89be118a3b
commit 99eb07e232
  1. 2
      tests/CommonLibs/SocketsTest.cpp

@ -47,7 +47,7 @@ void *testReaderIP(void *param)
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);

Loading…
Cancel
Save