aboutsummaryrefslogtreecommitdiff
path: root/src/revocation/gnunet-revocation.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/revocation/gnunet-revocation.c')
-rw-r--r--src/revocation/gnunet-revocation.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/revocation/gnunet-revocation.c b/src/revocation/gnunet-revocation.c
index 99fecdd35..a7f96385c 100644
--- a/src/revocation/gnunet-revocation.c
+++ b/src/revocation/gnunet-revocation.c
@@ -343,7 +343,13 @@ ego_callback (void *cls, struct GNUNET_IDENTITY_Ego *ego)
343 GNUNET_DISK_fn_read (filename, proof_of_work, 343 GNUNET_DISK_fn_read (filename, proof_of_work,
344 GNUNET_REVOCATION_MAX_PROOF_SIZE)))) 344 GNUNET_REVOCATION_MAX_PROOF_SIZE))))
345 { 345 {
346 size_t ksize = GNUNET_IDENTITY_key_get_length (&key); 346 ssize_t ksize = GNUNET_IDENTITY_key_get_length (&key);
347 if (0 > ksize)
348 {
349 fprintf (stderr,
350 _ ("Error: Key is invalid\n"));
351 return;
352 }
347 if (((psize - sizeof (*proof_of_work)) < ksize) || // Key too small 353 if (((psize - sizeof (*proof_of_work)) < ksize) || // Key too small
348 (0 != memcmp (&proof_of_work[1], &key, ksize))) // Keys do not match 354 (0 != memcmp (&proof_of_work[1], &key, ksize))) // Keys do not match
349 { 355 {