Skip to content

Commit

Permalink
Fix cfg fuzz
Browse files Browse the repository at this point in the history
I did not investigate too much into trying to figure out how the
encoding for simple crypto works. I made some simple changes(basically
disabled the checks for uncompressed keys) and atleast it works for
uncompressed keys roundtrip.
  • Loading branch information
sanket1729 committed Jul 15, 2021
1 parent 05f4278 commit 67578cf
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions secp256k1-sys/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -816,8 +816,7 @@ mod fuzz_dummy {
0
} else {
ptr::copy(input.offset(1), (*pk).0.as_mut_ptr(), 64);
test_cleanup_pk(pk);
test_pk_validate(cx, pk)
1
}
},
_ => 0
Expand All @@ -830,9 +829,9 @@ mod fuzz_dummy {
compressed: c_uint)
-> c_int {
check_context_flags(cx, 0);
assert_eq!(test_pk_validate(cx, pk), 1);
if compressed == SECP256K1_SER_COMPRESSED {
assert_eq!(*out_len, 33);
assert_eq!(test_pk_validate(cx, pk), 1);
if (*pk).0[32] <= 0x7f {
*output = 2;
} else {
Expand Down

0 comments on commit 67578cf

Please sign in to comment.