diff --git a/programs/native/storage/src/lib.rs b/programs/native/storage/src/lib.rs index 397956830e..c1a9c76597 100644 --- a/programs/native/storage/src/lib.rs +++ b/programs/native/storage/src/lib.rs @@ -45,6 +45,11 @@ fn entrypoint( Err(ProgramError::GenericError)?; } + if !check_id(&keyed_accounts[1].account.owner) { + error!("account[1] is not assigned to the STORAGE_PROGRAM"); + Err(ProgramError::InvalidArgument)?; + } + if *keyed_accounts[1].unsigned_key() != system_id() { info!( "invalid account id owner: {:?} system_id: {:?}",