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/util/gnunet-ecc.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/util/gnunet-ecc.c')
-rw-r--r-- | src/util/gnunet-ecc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/util/gnunet-ecc.c b/src/util/gnunet-ecc.c index 6d352e3ab..ddfd9b1c3 100644 --- a/src/util/gnunet-ecc.c +++ b/src/util/gnunet-ecc.c | |||
@@ -323,7 +323,7 @@ print_key (const char *filename) | |||
323 | total_hostkeys = fs / GNUNET_TESTING_HOSTKEYFILESIZE; | 323 | total_hostkeys = fs / GNUNET_TESTING_HOSTKEYFILESIZE; |
324 | for (c = 0; (c < total_hostkeys) && (c < list_keys_count); c++) | 324 | for (c = 0; (c < total_hostkeys) && (c < list_keys_count); c++) |
325 | { | 325 | { |
326 | memcpy (&private_key, | 326 | GNUNET_memcpy (&private_key, |
327 | hostkeys_data + (c * GNUNET_TESTING_HOSTKEYFILESIZE), | 327 | hostkeys_data + (c * GNUNET_TESTING_HOSTKEYFILESIZE), |
328 | GNUNET_TESTING_HOSTKEYFILESIZE); | 328 | GNUNET_TESTING_HOSTKEYFILESIZE); |
329 | GNUNET_CRYPTO_eddsa_key_get_public (&private_key, &public_key); | 329 | GNUNET_CRYPTO_eddsa_key_get_public (&private_key, &public_key); |