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"
30
30
name = " parse_descriptor"
31
31
path = " fuzz_targets/parse_descriptor.rs"
32
32
33
+ [[bin ]]
34
+ name = " parse_descriptor_priv"
35
+ path = " fuzz_targets/parse_descriptor_priv.rs"
36
+
33
37
[[bin ]]
34
38
name = " parse_descriptor_secret"
35
39
path = " 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:: bitcoin:: secp256k1;
5
+ use miniscript:: Descriptor ;
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