summaryrefslogtreecommitdiff
path: root/src/revocation/gnunet-service-revocation.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/revocation/gnunet-service-revocation.c')
-rw-r--r--src/revocation/gnunet-service-revocation.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/revocation/gnunet-service-revocation.c b/src/revocation/gnunet-service-revocation.c
index 6f70720ba..2d8111adb 100644
--- a/src/revocation/gnunet-service-revocation.c
+++ b/src/revocation/gnunet-service-revocation.c
@@ -943,9 +943,17 @@ run (void *cls,
}
struct GNUNET_REVOCATION_PowP *pow = (struct
GNUNET_REVOCATION_PowP *) &rm[1];
+ ssize_t ksize;
pk = (const struct GNUNET_IDENTITY_PublicKey *) &pow[1];
+ ksize = GNUNET_IDENTITY_key_get_length (pk);
+ if (0 > ksize)
+ {
+ GNUNET_break_op (0);
+ GNUNET_free (fn);
+ return;
+ }
GNUNET_CRYPTO_hash (pk,
- GNUNET_IDENTITY_key_get_length (pk),
+ ksize,
&hc);
GNUNET_break (GNUNET_OK ==
GNUNET_CONTAINER_multihashmap_put (revocation_map,