Skip to content

Commit

Permalink
fix: Off-by one check on offchain config setting
Browse files Browse the repository at this point in the history
We didn't allow filling the last byte of the config area.
  • Loading branch information
archseer committed Jul 27, 2022
1 parent 0d3b140 commit fd61a03
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion contracts/programs/ocr2/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ pub mod ocr2 {
require!(proposal.state != Proposal::FINALIZED, InvalidInput);

require!(
offchain_config.len() < proposal.offchain_config.remaining_capacity(),
offchain_config.len() <= proposal.offchain_config.remaining_capacity(),
InvalidInput
);
proposal.offchain_config.extend(&offchain_config);
Expand Down

0 comments on commit fd61a03

Please sign in to comment.