Increases check_number_of_instruction_accounts() in BPF loader. (#23440)

This commit is contained in:
Alexander Meißner 2022-03-04 14:33:27 +01:00 committed by GitHub
parent 38db1dead4
commit e23c6ce62b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -529,7 +529,7 @@ fn process_loader_upgradeable_instruction(
)?;
}
UpgradeableLoaderInstruction::DeployWithMaxDataLen { max_data_len } => {
instruction_context.check_number_of_instruction_accounts(1)?;
instruction_context.check_number_of_instruction_accounts(4)?;
let programdata_address = *instruction_context.get_instruction_account_key(
transaction_context,
upgradeable_ins_acc_idx::DeployWithMaxDataLen::ProgramData as usize,
@ -725,7 +725,7 @@ fn process_loader_upgradeable_instruction(
ic_logger_msg!(log_collector, "Deployed program {:?}", new_program_id);
}
UpgradeableLoaderInstruction::Upgrade => {
instruction_context.check_number_of_instruction_accounts(1)?;
instruction_context.check_number_of_instruction_accounts(3)?;
let current_programdata_address = *instruction_context.get_instruction_account_key(
transaction_context,
upgradeable_ins_acc_idx::Upgrade::ProgramData as usize,