diff options
author | Martin Schanzenbach <mschanzenbach@posteo.de> | 2021-03-26 22:32:12 +0100 |
---|---|---|
committer | Martin Schanzenbach <mschanzenbach@posteo.de> | 2021-03-26 22:32:12 +0100 |
commit | 33054bb2a8d6272e2f137e8be1833ff9e469c177 (patch) | |
tree | c78739fcf778dc56540877d255ae25766255a672 /src/revocation/gnunet-service-revocation.c | |
parent | 040ebbd2039e5ae0ba93ad3b7976721088ff6294 (diff) | |
download | gnunet-33054bb2a8d6272e2f137e8be1833ff9e469c177.tar.gz gnunet-33054bb2a8d6272e2f137e8be1833ff9e469c177.zip |
-more coverity fixes
Diffstat (limited to 'src/revocation/gnunet-service-revocation.c')
-rw-r--r-- | src/revocation/gnunet-service-revocation.c | 9 |
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, |