com php-src: Fix bug #72910: ext/mbstring/oniguruma/enc/utf8.c
| From: | Stanislav Malyshev | Date: | Fri, 02 Sep 2016 06:27:06 +0000 |
| Subject: | com php-src: Fix bug #72910: ext/mbstring/oniguruma/enc/utf8.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-94245@lists.php.net to get a copy of this message | ||
Commit: e576714f6b4829763b797c552217a14e6d30ca59
Author: Stanislav Malyshev <stas@php.net> Thu, 1 Sep 2016 23:27:06 -0700
Parents: fbb81dd755db95e63228fb764ef8edc40db9152f
Branches: PHP-5.6 PHP-7.0 PHP-7.1 master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=e576714f6b4829763b797c552217a14e6d30ca59
Log:
Fix bug #72910
Merge upstream patch from https://github.com/kkos/oniguruma/commit/65bdf2a0d160d06556415e5f396a75f6b11bad5c
Bugs:
https://bugs.php.net/72910
Changed paths:
M ext/mbstring/oniguruma/enc/utf8.c
Diff:
diff --git a/ext/mbstring/oniguruma/enc/utf8.c b/ext/mbstring/oniguruma/enc/utf8.c
index 5e2c172..74122e1 100644
--- a/ext/mbstring/oniguruma/enc/utf8.c
+++ b/ext/mbstring/oniguruma/enc/utf8.c
@@ -98,7 +98,7 @@ mbc_to_code(const UChar* p, const UChar* end ARG_UNUSED)
len = enclen(ONIG_ENCODING_UTF8, p);
c = *p++;
- if (len > 1) {
+ if (len > 1 && p < end) {
len--;
n = c & ((1 << (6 - len)) - 1);
while (len--) {