summaryrefslogtreecommitdiff
path: root/src/revocation/revocation_api.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/revocation/revocation_api.c')
-rw-r--r--src/revocation/revocation_api.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/revocation/revocation_api.c b/src/revocation/revocation_api.c
index e2f871c23..f2b95bafa 100644
--- a/src/revocation/revocation_api.c
+++ b/src/revocation/revocation_api.c
@@ -707,6 +707,7 @@ GNUNET_REVOCATION_pow_round (struct GNUNET_REVOCATION_PowCalculationHandle *pc)
unsigned int zeros;
int ret;
uint64_t pow_nbo;
+ ssize_t ksize;
pc->current_pow++;
pk = (const struct GNUNET_IDENTITY_PublicKey *) &(pc->pow[1]);
@@ -722,9 +723,11 @@ GNUNET_REVOCATION_pow_round (struct GNUNET_REVOCATION_PowCalculationHandle *pc)
GNUNET_memcpy (&buf[sizeof(uint64_t)],
&pc->pow->timestamp,
sizeof (uint64_t));
+ ksize = GNUNET_IDENTITY_key_get_length (pk);
+ GNUNET_assert (0 < ksize);
GNUNET_memcpy (&buf[sizeof(uint64_t) * 2],
pk,
- GNUNET_IDENTITY_key_get_length (pk));
+ ksize);
GNUNET_CRYPTO_pow_hash (&salt,
buf,
sizeof(buf),