summaryrefslogtreecommitdiff
path: root/ext/pcre/php_pcre.c
diff options
context:
space:
mode:
authorAnatol Belski <ab@php.net>2016-06-22 19:05:31 +0200
committerAnatol Belski <ab@php.net>2016-06-22 19:06:33 +0200
commite4539042516f337435c07a6e207eb5178e199d9a (patch)
treef017c93fdbd88237ed7a0509b4a7d1e59f52255e /ext/pcre/php_pcre.c
parent3c84e5e1ceff8b7a17c3047c5ade822067a55a70 (diff)
downloadphp-git-e4539042516f337435c07a6e207eb5178e199d9a.tar.gz
Fixed bug #72463 mail fails with invalid argument
Diffstat (limited to 'ext/pcre/php_pcre.c')
-rw-r--r--ext/pcre/php_pcre.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/pcre/php_pcre.c b/ext/pcre/php_pcre.c
index ed0f3b3ac4..356b5dc95a 100644
--- a/ext/pcre/php_pcre.c
+++ b/ext/pcre/php_pcre.c
@@ -1331,7 +1331,7 @@ PHPAPI zend_string *php_pcre_replace_impl(pcre_cache_entry *pce, zend_string *su
break;
}
new_len = result_len + subject_len - start_offset;
- if (new_len > alloc_len) {
+ if (new_len >= alloc_len) {
alloc_len = new_len; /* now we know exactly how long it is */
if (NULL != result) {
result = zend_string_realloc(result, alloc_len, 0);