summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Schanzenbach <schanzen@gnunet.org>2022-03-29 17:03:58 +0200
committerMartin Schanzenbach <schanzen@gnunet.org>2022-03-29 17:03:58 +0200
commita6e38df1a0d142e9341f818bd94e07eabb730da8 (patch)
tree54058a583b629999e73fc52041c6bf148eacc1d4
parenta9b18aa64cc03978ac410bd2cb99133040f0b188 (diff)
-add assertion again
-rw-r--r--src/gns/plugin_block_gns.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/src/gns/plugin_block_gns.c b/src/gns/plugin_block_gns.c
index 2d61f6395..ffca16b6f 100644
--- a/src/gns/plugin_block_gns.c
+++ b/src/gns/plugin_block_gns.c
@@ -242,14 +242,8 @@ block_plugin_gns_check_reply (void *cls,
GNUNET_break (0);
return GNUNET_BLOCK_REPLY_TYPE_NOT_SUPPORTED;
}
- 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_assert (reply_block_size >= sizeof(struct GNUNET_GNSRECORD_Block));
+ GNUNET_assert (reply_block_size >= GNUNET_GNSRECORD_block_get_size (block));
GNUNET_CRYPTO_hash (reply_block,
reply_block_size,
&chash);