tests: null-terminate buffer

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

Change-Id: Icdde701839e35d3131605ea5a11882af21c8939a
Fixes: CID149362
This commit is contained in:
Max 2018-01-31 11:34:59 +01:00
parent 89be118a3b
commit 99eb07e232
1 changed files with 1 additions and 1 deletions

View File

@ -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);