Skip to content

Commit

Permalink
Backport of solana-labs#31488.
Browse files Browse the repository at this point in the history
  • Loading branch information
Lichtso committed May 4, 2023
1 parent d34ba08 commit 5a8c1ef
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions runtime/src/accounts.rs
Original file line number Diff line number Diff line change
Expand Up @@ -539,6 +539,12 @@ impl Accounts {
self.accounts_db
.load_with_fixed_root(ancestors, &owner_id, load_zero_lamports)
{
if !native_loader::check_id(owner_account.owner())
|| !owner_account.executable()
{
error_counters.invalid_program_for_execution += 1;
return Err(TransactionError::InvalidProgramForExecution);
}
accounts.push((owner_id, owner_account));
} else {
error_counters.account_not_found += 1;
Expand Down

0 comments on commit 5a8c1ef

Please sign in to comment.