IOP _ ThunderNFT 34761 - [Smart Contract - Low] Off-by-one error in get_whitelisted_strategy
Description
Brief/Intro
Vulnerability Details
/// Returns a whitelisted strategy at the index
#[storage(read)]
fn get_whitelisted_strategy(index: u64) -> Option<ContractId> {
let len = storage.strategies.len();
require(len != 0, ExecutionManagerErrors::ZeroLengthVec);
require(index <= len, ExecutionManagerErrors::IndexOutOfBound);
storage.strategies.get(index).unwrap().try_read()
}Impact Details
References
Proof of concept
PreviousIOP _ ThunderNFT 34760 - [Smart Contract - Low] Off-by-one error in get_supported_assetNextIOP _ ThunderNFT 34791 - [Smart Contract - Low] Incompatibility with SRC might lead to inability of
Last updated
Was this helpful?