diff options
author | antirez <antirez@gmail.com> | 2015-01-13 09:31:37 +0100 |
---|---|---|
committer | antirez <antirez@gmail.com> | 2015-01-13 16:23:40 +0100 |
commit | 799a3ccac1503ed327c24b75ed1541d5749a71d8 (patch) | |
tree | f6600cdb7114fa30be9072ecc02a4f8898de62a9 | |
parent | 1584c7a31bc7d6a62d082bddfe815d5f8d14beec (diff) | |
download | redis-799a3ccac1503ed327c24b75ed1541d5749a71d8.tar.gz |
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.
-rw-r--r-- | src/cluster.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/cluster.c b/src/cluster.c index e7219fd65..7d89c6f9f 100644 --- a/src/cluster.c +++ b/src/cluster.c @@ -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), |