File tree Expand file tree Collapse file tree 3 files changed +41
-0
lines changed
Expand file tree Collapse file tree 3 files changed +41
-0
lines changed Original file line number Diff line number Diff line change 1+
2+ target
3+ corpus
4+ artifacts
Original file line number Diff line number Diff line change 1+
2+ [package ]
3+ name = " unicode-segmentation-fuzz"
4+ version = " 0.0.0"
5+ authors = [" Automatically generated" ]
6+ publish = false
7+ edition = " 2018"
8+
9+ [package .metadata ]
10+ cargo-fuzz = true
11+
12+ [dependencies ]
13+ libfuzzer-sys = " 0.4"
14+
15+ [dependencies .unicode-segmentation ]
16+ path = " .."
17+
18+ # Prevent this from interfering with workspaces
19+ [workspace ]
20+ members = [" ." ]
21+
22+ [[bin ]]
23+ name = " fuzz_target_1"
24+ path = " fuzz_targets/fuzz_target_1.rs"
25+ test = false
26+ doc = false
Original file line number Diff line number Diff line change 1+ #![ no_main]
2+ use libfuzzer_sys:: fuzz_target;
3+ use unicode_segmentation:: UnicodeSegmentation ;
4+
5+ fuzz_target ! ( |data: & [ u8 ] | {
6+ if let Ok ( s) = std:: str :: from_utf8( data) {
7+ let _g = s. graphemes( true ) . collect:: <Vec <& str >>( ) ;
8+ let _w = s. unicode_words( ) . collect:: <Vec <& str >>( ) ;
9+ let _ws = s. split_word_bounds( ) . collect:: <Vec <& str >>( ) ;
10+ }
11+ } ) ;
You can’t perform that action at this time.
0 commit comments