We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 98be16a commit a3978b2Copy full SHA for a3978b2
fuzz/fuzz_targets/fuzz_regex_match.rs
@@ -14,7 +14,9 @@ fuzz_target!(|data: &[u8]| {
14
let char_index = data.char_indices().nth(split_off_point);
15
if let Some((char_index, _)) = char_index {
16
let (pattern, input) = data.split_at(char_index);
17
- if let Ok(re) = regex::Regex::new(pattern) {
+ let result =
18
+ regex::RegexBuilder::new(pattern).size_limit(1 << 20).build();
19
+ if let Ok(re) = result {
20
re.is_match(input);
21
}
22
0 commit comments