From e89045b05fbb9daa97985ad762fd1a0175d2e3af Mon Sep 17 00:00:00 2001 From: "Constantin P." <papizh.konstantin@demlabs.net> Date: Mon, 14 Oct 2024 16:41:19 +0700 Subject: [PATCH] ... --- modules/chain/dap_chain_cell.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/chain/dap_chain_cell.c b/modules/chain/dap_chain_cell.c index 58817574d9..88e50a2aaf 100644 --- a/modules/chain/dap_chain_cell.c +++ b/modules/chain/dap_chain_cell.c @@ -455,7 +455,7 @@ int dap_chain_cell_load(dap_chain_t *a_chain, dap_chain_cell_t *a_cell) uint64_t l_el_size = 0, q = 0; if (a_chain->is_mapped) { dap_hash_fast_t l_atom_hash; - for ( off_t l_vol_rest = 0; l_pos + sizeof(uint64_t) < l_full_size; ++q, l_pos += l_el_size + sizeof(uint64_t) ) { + for ( off_t l_vol_rest = 0; l_pos + sizeof(uint64_t) < (size_t)l_full_size; ++q, l_pos += l_el_size + sizeof(uint64_t) ) { l_vol_rest = (off_t)(a_cell->map_end - a_cell->map_pos) - sizeof(uint64_t); if ( l_vol_rest <= 0 || (uint64_t)l_vol_rest < *(uint64_t*)a_cell->map_pos ) if ( s_cell_map_new_volume(a_cell, l_pos, true) ) { -- GitLab