Problem: test_msg_ffn uses unitialised memory

Solution: memset temporary buffer before use to reduce Valgrind noise
This commit is contained in:
Luca Boccassi 2016-02-13 15:49:46 +00:00
parent 240190131c
commit 955b51dfd2

View File

@ -57,6 +57,7 @@ int main (void) {
zmq_msg_t msg;
char hint[5];
char data[255];
memset(data, 0, 255);
memcpy(data, (void *) "data", 4);
memcpy(hint, (void *) "hint", 4);
rc = zmq_msg_init_data(&msg, (void *)data, 255, ffn, (void*)hint);