Skip to content

Commit e8dc2ba

Browse files
sashashuraedsiper
authored andcommitted
lib: onigmo: fix OSS-FUZZ 46086
Temporary fix until k-takata/Onigmo#165 is merged Signed-off-by: sashashura <[email protected]>
1 parent 3bd717d commit e8dc2ba

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

regcomp.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -535,6 +535,9 @@ compile_string_node(Node* node, regex_t* reg)
535535
}
536536
else {
537537
r = add_compile_string(prev, prev_len, blen, reg, ambig);
538+
if (p + len > end) {
539+
return 0;
540+
}
538541
if (r) return r;
539542

540543
prev = p;

0 commit comments

Comments
 (0)