Skip to content

Commit

Permalink
add: num_signatures == 0 check from SIMD-0152
Browse files Browse the repository at this point in the history
  • Loading branch information
0xRigel committed Oct 13, 2024
1 parent 226eeef commit 4c753ff
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion sdk/src/secp256r1_instruction.rs
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,9 @@ pub fn verify(
return Err(PrecompileError::InvalidInstructionDataSize);
}
let num_signatures = data[0] as usize;

if num_signatures == 0 {
return Err(PrecompileError::InvalidInstructionDataSize);
}
if num_signatures > 8 {
return Err(PrecompileError::InvalidInstructionDataSize);
}
Expand Down

0 comments on commit 4c753ff

Please sign in to comment.