summaryrefslogtreecommitdiff
path: root/ext/zlib/zlib.c
diff options
context:
space:
mode:
authorNikita Popov <nikic@php.net>2017-01-08 13:48:48 +0100
committerNikita Popov <nikic@php.net>2017-01-08 13:48:48 +0100
commitb38e6a54cf4500780fd8ba68ae66714a0f21dd86 (patch)
tree2018b3b7f39f35f06892e3573351ce1a5f4c33a5 /ext/zlib/zlib.c
parent329d487e688e885d4bdd8732a7ff94194d935c4a (diff)
parentb36f4ac7089a05682081385cb4e6c1051cba9bc1 (diff)
downloadphp-git-b38e6a54cf4500780fd8ba68ae66714a0f21dd86.tar.gz
Merge branch 'PHP-7.0' into PHP-7.1
Diffstat (limited to 'ext/zlib/zlib.c')
-rw-r--r--ext/zlib/zlib.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/ext/zlib/zlib.c b/ext/zlib/zlib.c
index 1ed5d06dac..cb8db9b0a9 100644
--- a/ext/zlib/zlib.c
+++ b/ext/zlib/zlib.c
@@ -1171,8 +1171,7 @@ PHP_FUNCTION(deflate_add)
if (ctx->avail_out == 0) {
/* more output buffer space needed; realloc and try again */
/* adding 64 more bytes solved every issue I have seen */
- /* the + 1 is for the string terminator added below */
- out = zend_string_realloc(out, ZSTR_LEN(out) + 64 + 1, 0);
+ out = zend_string_realloc(out, ZSTR_LEN(out) + 64, 0);
ctx->avail_out = 64;
ctx->next_out = (Bytef *) ZSTR_VAL(out) + buffer_used;
}