Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit573b7bb

Browse files
authored
Merge pull request#94 from DavidKorczynski/master
initial fuzzer for oss-fuzz integration.
2 parents5bde47b +f07c544 commit573b7bb

File tree

3 files changed

+41
-0
lines changed

3 files changed

+41
-0
lines changed

‎fuzz/.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
2+
target
3+
corpus
4+
artifacts

‎fuzz/Cargo.toml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
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

‎fuzz/fuzz_targets/fuzz_target_1.rs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#![no_main]
2+
use libfuzzer_sys::fuzz_target;
3+
use unicode_segmentation::UnicodeSegmentation;
4+
5+
fuzz_target!(|data:&[u8]|{
6+
ifletOk(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+
});

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp