com php-src: Patch from the upstream git https://github.com/kkos/oniguruma/issues/58 (CVE-2017-9227): ext/mbstring/oniguruma/regexec.c
| From: | Remi Collet | Date: | Wed, 05 Jul 2017 07:25:49 +0000 |
| Subject: | com php-src: Patch from the upstream git https://github.com/kkos/oniguruma/issues/58 (CVE-2017-9227): ext/mbstring/oniguruma/regexec.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-98366@lists.php.net to get a copy of this message | ||
Commit: bdf7393ddb15d0ac522250a9825b685437e2b966
Author: Remi Collet <remi@php.net> Tue, 30 May 2017 15:38:17 +0200
Parents: 2693e52113ea0369144073e84d568931ffc173a7
Branches: PHP-5.6
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=bdf7393ddb15d0ac522250a9825b685437e2b966
Log:
Patch from the upstream git
https://github.com/kkos/oniguruma/issues/58
(CVE-2017-9227)
Thanks to Mamoru TASAKA <mtasaka@fedoraproject.org>
Changed paths:
M ext/mbstring/oniguruma/regexec.c
Diff:
diff --git a/ext/mbstring/oniguruma/regexec.c b/ext/mbstring/oniguruma/regexec.c
index 5e26896..97d5f32 100644
--- a/ext/mbstring/oniguruma/regexec.c
+++ b/ext/mbstring/oniguruma/regexec.c
@@ -3123,6 +3123,8 @@ forward_search_range(regex_t* reg, const UChar* str, const UChar* end, UChar*
s,
}
else {
UChar *q = p + reg->dmin;
+
+ if (q >= end) return 0; /* fail */
while (p < q) p += enclen(reg->enc, p);
}
}