FV-ANC-3-CL2 Trying to access account data without ownership checks
Bad
// Accessing account data without validating its ownership
let config_data = &ctx.accounts.config.data.borrow();
Good
// Validate that the account is owned by the current program
if ctx.accounts.config.owner != ctx.program_id {
return Err(ProgramError::IllegalOwner);
}
let config_data = &ctx.accounts.config.data.borrow();
PreviousFV-ANC-3-CL1 Trying to modify an account without checking if it's writeableNextFV-ANC-3-CL3 Usage of UncheckedAccount without manual ownership check
Last updated
Was this helpful?