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:
parent
89be118a3b
commit
99eb07e232
|
@ -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…
Reference in New Issue