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/revocation/revocation_api.c | |
parent | 5184c17d32a39c928c2a0fec3ee1ad098bbaa562 (diff) |
-avoid calling memcpy() with NULL argument, even if len is 0
Diffstat (limited to 'src/revocation/revocation_api.c')
-rw-r--r-- | src/revocation/revocation_api.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/revocation/revocation_api.c b/src/revocation/revocation_api.c index 57431f250a..0b9bc4ea64 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) >= |