diff options
author | Christian Grothoff <christian@grothoff.org> | 2016-07-08 17:20:23 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2016-07-08 17:20:23 +0000 |
commit | d8c53b12a818ff7cf82d06a1a69c395bdef85ee6 (patch) | |
tree | 0ebb0db416c157fcfde51a941185819dd12d51fd /src/testbed/gnunet-daemon-testbed-underlay.c | |
parent | 5184c17d32a39c928c2a0fec3ee1ad098bbaa562 (diff) | |
download | gnunet-d8c53b12a818ff7cf82d06a1a69c395bdef85ee6.tar.gz gnunet-d8c53b12a818ff7cf82d06a1a69c395bdef85ee6.zip |
-avoid calling memcpy() with NULL argument, even if len is 0
Diffstat (limited to 'src/testbed/gnunet-daemon-testbed-underlay.c')
-rw-r--r-- | src/testbed/gnunet-daemon-testbed-underlay.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/testbed/gnunet-daemon-testbed-underlay.c b/src/testbed/gnunet-daemon-testbed-underlay.c index 663ab2d08..b02566fed 100644 --- a/src/testbed/gnunet-daemon-testbed-underlay.c +++ b/src/testbed/gnunet-daemon-testbed-underlay.c | |||
@@ -170,7 +170,7 @@ get_identity (unsigned int offset, struct GNUNET_PeerIdentity *id) | |||
170 | 170 | ||
171 | if (offset >= num_hostkeys) | 171 | if (offset >= num_hostkeys) |
172 | return GNUNET_SYSERR; | 172 | return GNUNET_SYSERR; |
173 | (void) memcpy (&private_key, | 173 | GNUNET_memcpy (&private_key, |
174 | hostkeys_data + (offset * GNUNET_TESTING_HOSTKEYFILESIZE), | 174 | hostkeys_data + (offset * GNUNET_TESTING_HOSTKEYFILESIZE), |
175 | GNUNET_TESTING_HOSTKEYFILESIZE); | 175 | GNUNET_TESTING_HOSTKEYFILESIZE); |
176 | GNUNET_CRYPTO_eddsa_key_get_public (&private_key, &id->public_key); | 176 | GNUNET_CRYPTO_eddsa_key_get_public (&private_key, &id->public_key); |