From 9504cd0f52e0ed979a94fc71ab9a30e323a0845b Mon Sep 17 00:00:00 2001 From: Behrang Norouzinia Date: Sat, 6 Jul 2024 09:05:32 +0330 Subject: [PATCH] Fix checking for length of internal signed message --- contracts/wallet_v5.fc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/contracts/wallet_v5.fc b/contracts/wallet_v5.fc index 65e213a..17f72c9 100644 --- a/contracts/wallet_v5.fc +++ b/contracts/wallet_v5.fc @@ -261,7 +261,7 @@ cell verify_c5_actions(cell c5, int is_external) inline { ;; Before signature checking we handle errors silently (return), after signature checking we throw exceptions. ;; Check to make sure that there are enough bits for reading before signature check - if (in_msg_body.slice_bits() < size::message_operation_prefix + size::wallet_id + size::valid_until + size::seqno + size::signature) { + if (in_msg_body.slice_bits() < size::message_operation_prefix + size::wallet_id + size::valid_until + size::seqno + size::signature + size::bool + size::bool) { return (); } process_signed_request(in_msg_body, false); @@ -298,4 +298,4 @@ cell get_extensions() method_id { return get_data().begin_parse() .skip_bits(size::bool + size::seqno + size::wallet_id + size::public_key) .preload_dict(); -} \ No newline at end of file +}