Skip to content

Commit bdf7393

Browse files
committed
Patch from the upstream git
kkos/oniguruma#58 (CVE-2017-9227) Thanks to Mamoru TASAKA <mtasaka@fedoraproject.org>
1 parent 2693e52 commit bdf7393

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

ext/mbstring/oniguruma/regexec.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3123,6 +3123,8 @@ forward_search_range(regex_t* reg, const UChar* str, const UChar* end, UChar* s,
31233123
}
31243124
else {
31253125
UChar *q = p + reg->dmin;
3126+
3127+
if (q >= end) return 0; /* fail */
31263128
while (p < q) p += enclen(reg->enc, p);
31273129
}
31283130
}

0 commit comments

Comments
 (0)