From d8c53b12a818ff7cf82d06a1a69c395bdef85ee6 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Fri, 8 Jul 2016 17:20:23 +0000 Subject: -avoid calling memcpy() with NULL argument, even if len is 0 --- src/util/gnunet-scrypt.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/util/gnunet-scrypt.c') diff --git a/src/util/gnunet-scrypt.c b/src/util/gnunet-scrypt.c index faf04cf27..ab0cf92e0 100644 --- a/src/util/gnunet-scrypt.c +++ b/src/util/gnunet-scrypt.c @@ -131,14 +131,14 @@ find_proof (void *cls) "Got Proof of Work %llu\n", (unsigned long long) proof); proof_task = NULL; - memcpy (&buf[sizeof (uint64_t)], &pub, + GNUNET_memcpy (&buf[sizeof (uint64_t)], &pub, sizeof (struct GNUNET_CRYPTO_EddsaPublicKey)); i = 0; counter = proof; timestamp = GNUNET_TIME_absolute_get (); while ((counter != UINT64_MAX) && (i < ROUND_SIZE)) { - memcpy (buf, &counter, sizeof (uint64_t)); + GNUNET_memcpy (buf, &counter, sizeof (uint64_t)); pow_hash (buf, sizeof (buf), &result); if (nse_work_required <= count_leading_zeroes (&result)) { -- cgit v1.2.3