diff options
author | Bob Weinand <bobwei9@hotmail.com> | 2017-03-15 00:09:42 +0100 |
---|---|---|
committer | Bob Weinand <bobwei9@hotmail.com> | 2017-03-15 00:09:42 +0100 |
commit | f3ab4c1a086b17daad7a8ecf34292fff6b9566ce (patch) | |
tree | 1ebdd4eab5e673333b81cb4714f1b1e0b6079250 /ext/zlib/zlib.c | |
parent | 3d4e954518e467ae6853ee2d22defa35b32b2c73 (diff) | |
parent | 7fba8bda4c9e89c522e5d27a38489125e36b9904 (diff) | |
download | php-git-f3ab4c1a086b17daad7a8ecf34292fff6b9566ce.tar.gz |
Merge branch 'PHP-7.0' into PHP-7.1
Diffstat (limited to 'ext/zlib/zlib.c')
-rw-r--r-- | ext/zlib/zlib.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/ext/zlib/zlib.c b/ext/zlib/zlib.c index cb8db9b0a9..dd0a1c23ef 100644 --- a/ext/zlib/zlib.c +++ b/ext/zlib/zlib.c @@ -1154,10 +1154,8 @@ PHP_FUNCTION(deflate_add) RETURN_EMPTY_STRING(); } - out_size = PHP_ZLIB_BUFFER_SIZE_GUESS(ctx->total_in + in_len); - out_size = (ctx->total_out >= out_size) ? 16 : (out_size - ctx->total_out); - out_size = (out_size < 16) ? 16 : out_size; - out_size += 64; + out_size = PHP_ZLIB_BUFFER_SIZE_GUESS(in_len); + out_size = (out_size < 64) ? 64 : out_size; out = zend_string_alloc(out_size, 0); ctx->next_in = (Bytef *) in_buf; |