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

Commit

Permalink
nudge
Browse files Browse the repository at this point in the history
  • Loading branch information
jackcmay committed May 25, 2020
1 parent 9f73f46 commit 3b5f856
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions programs/bpf_loader/src/syscalls.rs
Original file line number Diff line number Diff line change
Expand Up @@ -710,15 +710,15 @@ fn verify_instruction<'a>(
))?;
// Readonly account cannot become writable
if account.is_writable && !keyed_account.is_writable() {
return Err(SyscallError::PriviledgeEscalation.into());
return Err(SyscallError::PrivilegeEscalation.into());
}

if account.is_signer && // If message indicates account is signed
!( // one of the following needs to be true:
keyed_account.signer_key().is_some() // Signed in the parent instruction
|| signers.contains(&account.pubkey) // Signed by the program
) {
return Err(SyscallError::PriviledgeEscalation.into());
return Err(SyscallError::PrivilegeEscalation.into());
}
}

Expand Down

0 comments on commit 3b5f856

Please sign in to comment.