FV-ANC-3-CL8 Using ctx.remaining_accounts without manual ownership check
Bad
let extra_account = &ctx.remaining_accounts[0];
// No ownership validation performed.
Good
let extra_account = &ctx.remaining_accounts[0];
if extra_account.owner != &expected_program_id {
return Err(ProgramError::IllegalOwner);
}
PreviousFV-ANC-3-CL7 Duplicate mutable accountsNextFV-ANC-3-CL9 Using ctx.remaining_accounts without manual discriminator check
Last updated
Was this helpful?