File tree Expand file tree Collapse file tree 2 files changed +27
-0
lines changed
Expand file tree Collapse file tree 2 files changed +27
-0
lines changed Original file line number Diff line number Diff line change @@ -30,6 +30,10 @@ path = "fuzz_targets/compile_taproot.rs"
3030name = " parse_descriptor"
3131path = " fuzz_targets/parse_descriptor.rs"
3232
33+ [[bin ]]
34+ name = " parse_descriptor_priv"
35+ path = " fuzz_targets/parse_descriptor_priv.rs"
36+
3337[[bin ]]
3438name = " parse_descriptor_secret"
3539path = " fuzz_targets/parse_descriptor_secret.rs"
Original file line number Diff line number Diff line change 1+ #![ allow( unexpected_cfgs) ]
2+
3+ use honggfuzz:: fuzz;
4+ use miniscript:: Descriptor ;
5+ use miniscript:: bitcoin:: secp256k1;
6+
7+ fn do_test ( data : & [ u8 ] ) {
8+ let data_str = String :: from_utf8_lossy ( data) ;
9+ let secp = & secp256k1:: Secp256k1 :: signing_only ( ) ;
10+
11+ if let Ok ( ( desc, _) ) = Descriptor :: parse_descriptor ( & secp, & data_str) {
12+ let _output = desc. to_string ( ) ;
13+ let _sanity_check = desc. sanity_check ( ) ;
14+ }
15+ }
16+
17+ fn main ( ) {
18+ loop {
19+ fuzz ! ( |data| {
20+ do_test( data) ;
21+ } ) ;
22+ }
23+ }
You can’t perform that action at this time.
0 commit comments