]> granicus.if.org Git - php/commitdiff
fix #72143 (preg_replace uses int instead of size_t on zend_string_allocs)
authorJoe Watkins <krakjoe@php.net>
Sat, 14 May 2016 07:20:41 +0000 (08:20 +0100)
committerJoe Watkins <krakjoe@php.net>
Sat, 14 May 2016 07:20:41 +0000 (08:20 +0100)
NEWS
ext/pcre/php_pcre.c

diff --git a/NEWS b/NEWS
index d3cd2f5daf6ac7eda28072855dd91b483626299d..d102d60792705c97471098d7fa0ec26fc57779b6 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -5,6 +5,9 @@ PHP                                                                        NEWS
 - Intl
   . Fixed bug #64524 (Add intl.use_exceptions to php.ini-*). (Anatol)
 
+- PCRE
+  . Fixed bug #72143 (preg_replace uses int instead of size_t). (Joe)
+
 - PDO_pgsql:
   . Fixed bug #71573 (Segfault (core dumped) if paramno beyond bound).
     (Laruence)
index f6f86304e5ec1143337e4f509741a9e191c17e11..ed0f3b3ac491b1bebbda9423d378e4c671b51297 100644 (file)
@@ -1119,8 +1119,8 @@ PHPAPI zend_string *php_pcre_replace_impl(pcre_cache_entry *pce, zend_string *su
        char                    **subpat_names;         /* Array for named subpatterns */
        int                              num_subpats;           /* Number of captured subpatterns */
        int                              size_offsets;          /* Size of the offsets array */
-       int                              new_len;                       /* Length of needed storage */
-       int                              alloc_len;                     /* Actual allocated length */
+       size_t                   new_len;                       /* Length of needed storage */
+       size_t                   alloc_len;                     /* Actual allocated length */
        int                              match_len;                     /* Length of the current match */
        int                              backref;                       /* Backreference number */
        int                              start_offset;          /* Where the new search starts */