Ensure fuzztarget pubkey deserialize-serialize roundtrips are same

This commit is contained in:
Matt Corallo 2018-03-29 15:41:28 -04:00
parent eee25f6265
commit 730da80f0b
1 changed files with 1 additions and 1 deletions

View File

@ -327,7 +327,7 @@ mod fuzz_dummy {
assert!(!cx.is_null() && (*cx).0 as u32 & !(SECP256K1_START_NONE | SECP256K1_START_VERIFY | SECP256K1_START_SIGN) == 0);
match in_len {
33 => {
if *input != 2 && *input != 3 {
if (*input.offset(1) > 0x7f && *input != 2) || (*input.offset(1) <= 0x7f && *input != 3) {
0
} else {
ptr::copy(input.offset(1), (*pk).0[0..32].as_mut_ptr(), 32);