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/revocation/revocation_api.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/revocation/revocation_api.c') diff --git a/src/revocation/revocation_api.c b/src/revocation/revocation_api.c index 57431f250..0b9bc4ea6 100644 --- a/src/revocation/revocation_api.c +++ b/src/revocation/revocation_api.c @@ -386,8 +386,8 @@ GNUNET_REVOCATION_check_pow (const struct GNUNET_CRYPTO_EcdsaPublicKey *key, sizeof (pow)] GNUNET_ALIGN; struct GNUNET_HashCode result; - memcpy (buf, &pow, sizeof (pow)); - memcpy (&buf[sizeof (pow)], key, + GNUNET_memcpy (buf, &pow, sizeof (pow)); + GNUNET_memcpy (&buf[sizeof (pow)], key, sizeof (struct GNUNET_CRYPTO_EcdsaPublicKey)); pow_hash (buf, sizeof (buf), &result); return (count_leading_zeroes (&result) >= -- cgit v1.2.3