com php-src: Fix bug #73634 - grapheme_strpos illegal mem ory access: ext/intl/grapheme/grapheme_string.c
| From: | Anatol Belski | Date: | Wed, 21 Jun 2017 14:52:14 +0000 |
| Subject: | com php-src: Fix bug #73634 - grapheme_strpos illegal mem ory access: ext/intl/grapheme/grapheme_string.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-98154@lists.php.net to get a copy of this message | ||
Commit: 5189e43b6dfe1774f8876214d2c583a64a446226
Author: Stanislav Malyshev <stas@php.net> Mon, 16 Jan 2017 01:18:16 -0800
Committer: Anatol Belski <ab@php.net> Wed, 21 Jun 2017 16:52:14 +0200
Parents: e2021d41f776d832a07112dd32c6a5d27259ac0a
Branches: PHP-7.0.21
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=5189e43b6dfe1774f8876214d2c583a64a446226
Log:
Fix bug #73634 - grapheme_strpos illegal memory access
(cherry picked from commit 18b6de7a91859df736781a3ea0bd248b94a9a6df)
Bugs:
https://bugs.php.net/73634
Changed paths:
M ext/intl/grapheme/grapheme_string.c
Diff:
diff --git a/ext/intl/grapheme/grapheme_string.c b/ext/intl/grapheme/grapheme_string.c
index f695004..ad75b35 100644
--- a/ext/intl/grapheme/grapheme_string.c
+++ b/ext/intl/grapheme/grapheme_string.c
@@ -110,7 +110,8 @@ PHP_FUNCTION(grapheme_strpos)
size_t haystack_len, needle_len;
const char *found;
zend_long loffset = 0;
- int32_t offset = 0, noffset = 0;
+ int32_t offset = 0;
+ size_t noffset = 0;
zend_long ret_pos;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "ss|l", &haystack, &haystack_len,
&needle, &needle_len, &loffset) == FAILURE) {