mirror of
https://codeberg.org/redict/redict.git
synced 2025-01-22 16:18:28 -05:00
Suppress valgrind error about write sending uninitialized data.
Valgrind checks that the buffers we transfer via syscalls are all composed of bytes actually initialized. This is useful, it makes we able to avoid leaking informations in non initialized parts fo messages transferred to other hosts. This commit fixes one of such issues.
This commit is contained in:
parent
f08586347d
commit
237ab727b9
@ -1119,6 +1119,7 @@ int clusterStartHandshake(char *ip, int port) {
|
||||
|
||||
/* Set norm_ip as the normalized string representation of the node
|
||||
* IP address. */
|
||||
memset(norm_ip,0,REDIS_IP_STR_LEN);
|
||||
if (sa.ss_family == AF_INET)
|
||||
inet_ntop(AF_INET,
|
||||
(void*)&(((struct sockaddr_in *)&sa)->sin_addr),
|
||||
|
Loading…
Reference in New Issue
Block a user