commit af5d0221a5fb3974b28b9808eea8e30deb1faa01
parent 9e6e6cf1ecb4424d93e8447d89b50a0d3cefeaf9
Author: Bart Polot <bart@net.in.tum.de>
Date: Wed, 5 Feb 2014 17:24:30 +0000
- wipe all previous data in *key so there is no potentially uninilialized memory
Diffstat:
1 file changed, 1 insertion(+), 0 deletions(-)
diff --git a/src/dht/plugin_block_dht.c b/src/dht/plugin_block_dht.c
@@ -147,6 +147,7 @@ block_plugin_dht_get_key (void *cls, enum GNUNET_BLOCK_Type type,
return GNUNET_NO;
}
hello = block;
+ memset (key, 0, sizeof (*key));
pid = (struct GNUNET_PeerIdentity *) key;
if (GNUNET_OK != GNUNET_HELLO_get_id (hello, pid))
{