Skip to content
This repository has been archived by the owner on Jan 13, 2025. It is now read-only.

Commit

Permalink
Fix bounds check of account_indices
Browse files Browse the repository at this point in the history
Co-authored-by: Justin Starry <[email protected]>
  • Loading branch information
Lichtso and jstarry authored Sep 21, 2021
1 parent dbc9918 commit 7d2d2b7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion runtime/src/message_processor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ impl<'a> InvokeContext for ThisInvokeContext<'a> {
let (mut pre_sum, mut post_sum) = (0_u128, 0_u128);
let mut work = |_unique_index: usize, index_in_instruction: usize| {
if index_in_instruction < write_privileges.len()
&& index_in_instruction < accounts.len()
&& index_in_instruction < account_indices.len()
{
let account_index = account_indices[index_in_instruction];
let (key, account) = &accounts[account_index];
Expand Down

0 comments on commit 7d2d2b7

Please sign in to comment.