[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gnunet] branch master updated: GNS: Do not fail on assertions in block
From: |
gnunet |
Subject: |
[gnunet] branch master updated: GNS: Do not fail on assertions in block processing |
Date: |
Tue, 29 Mar 2022 10:11:20 +0200 |
This is an automated email from the git hooks/post-receive script.
martin-schanzenbach pushed a commit to branch master
in repository gnunet.
The following commit(s) were added to refs/heads/master by this push:
new a9b18aa64 GNS: Do not fail on assertions in block processing
a9b18aa64 is described below
commit a9b18aa64cc03978ac410bd2cb99133040f0b188
Author: Martin Schanzenbach <schanzen@gnunet.org>
AuthorDate: Tue Mar 29 10:11:15 2022 +0200
GNS: Do not fail on assertions in block processing
---
src/gns/plugin_block_gns.c | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/src/gns/plugin_block_gns.c b/src/gns/plugin_block_gns.c
index aad1f1583..2d61f6395 100644
--- a/src/gns/plugin_block_gns.c
+++ b/src/gns/plugin_block_gns.c
@@ -242,8 +242,14 @@ block_plugin_gns_check_reply (void *cls,
GNUNET_break (0);
return GNUNET_BLOCK_REPLY_TYPE_NOT_SUPPORTED;
}
- GNUNET_assert (reply_block_size >= sizeof(struct GNUNET_GNSRECORD_Block));
- GNUNET_assert (GNUNET_GNSRECORD_block_get_size (block) < reply_block_size);
+ if (reply_block_size < sizeof(struct GNUNET_GNSRECORD_Block)) {
+ GNUNET_break_op (0);
+ return GNUNET_BLOCK_REPLY_TYPE_NOT_SUPPORTED;
+ }
+ if (GNUNET_GNSRECORD_block_get_size (block) > reply_block_size) {
+ GNUNET_break_op (0);
+ return GNUNET_BLOCK_REPLY_TYPE_NOT_SUPPORTED;
+ }
GNUNET_CRYPTO_hash (reply_block,
reply_block_size,
&chash);
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [gnunet] branch master updated: GNS: Do not fail on assertions in block processing,
gnunet <=