test_ed25519 fails if we randomly select index 1 (#22779)
(cherry picked from commit c1b543c74d
)
# Conflicts:
# sdk/src/ed25519_instruction.rs
Co-authored-by: Sean Young <sean@mess.org>
This commit is contained in:
@@ -108,6 +108,7 @@ pub fn verify_signatures(data: &[u8], instruction_datas: &[&[u8]]) -> Result<(),
|
||||
let expected_data_size = num_signatures
|
||||
.saturating_mul(SIGNATURE_OFFSETS_SERIALIZED_SIZE)
|
||||
.saturating_add(SIGNATURE_OFFSETS_START);
|
||||
// We do not check or use the byte at data[1]
|
||||
if data.len() < expected_data_size {
|
||||
return Err(Ed25519Error::InvalidInstructionDataSize);
|
||||
}
|
||||
|
Reference in New Issue
Block a user