mirror of
https://github.com/zeromq/libzmq.git
synced 2024-12-12 10:33:52 +01:00
Problem: test_msg_ffn uses unitialised memory
Solution: memset temporary buffer before use to reduce Valgrind noise
This commit is contained in:
parent
240190131c
commit
955b51dfd2
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user