aboutsummaryrefslogtreecommitdiff
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.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/revocation/gnunet-service-revocation.c b/src/revocation/gnunet-service-revocation.c
index 7032921c6..6f70720ba 100644
--- a/src/revocation/gnunet-service-revocation.c
+++ b/src/revocation/gnunet-service-revocation.c
@@ -306,12 +306,19 @@ publicize_rm (const struct RevokeMessage *rm)
306 struct RevokeMessage *cp; 306 struct RevokeMessage *cp;
307 struct GNUNET_HashCode hc; 307 struct GNUNET_HashCode hc;
308 struct GNUNET_SETU_Element e; 308 struct GNUNET_SETU_Element e;
309 ssize_t pklen;
309 const struct GNUNET_IDENTITY_PublicKey *pk; 310 const struct GNUNET_IDENTITY_PublicKey *pk;
310 311
311 struct GNUNET_REVOCATION_PowP *pow = (struct GNUNET_REVOCATION_PowP *) &rm[1]; 312 struct GNUNET_REVOCATION_PowP *pow = (struct GNUNET_REVOCATION_PowP *) &rm[1];
312 pk = (const struct GNUNET_IDENTITY_PublicKey *) &pow[1]; 313 pk = (const struct GNUNET_IDENTITY_PublicKey *) &pow[1];
314 pklen = GNUNET_IDENTITY_key_get_length (pk);
315 if (0 > pklen)
316 {
317 GNUNET_break_op (0);
318 return GNUNET_SYSERR;
319 }
313 GNUNET_CRYPTO_hash (pk, 320 GNUNET_CRYPTO_hash (pk,
314 GNUNET_IDENTITY_key_get_length (pk), 321 pklen,
315 &hc); 322 &hc);
316 if (GNUNET_YES == 323 if (GNUNET_YES ==
317 GNUNET_CONTAINER_multihashmap_contains (revocation_map, 324 GNUNET_CONTAINER_multihashmap_contains (revocation_map,