diff options
Diffstat (limited to 'ext/zlib/zlib.c')
-rw-r--r-- | ext/zlib/zlib.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/zlib/zlib.c b/ext/zlib/zlib.c index 64eac450cd..b638ab4377 100644 --- a/ext/zlib/zlib.c +++ b/ext/zlib/zlib.c @@ -336,7 +336,7 @@ static zend_string *php_zlib_encode(const char *in_buf, size_t in_len, int encod if (Z_STREAM_END == status) { /* size buffer down to actual length */ - out = zend_string_realloc(out, Z.total_out, 0); + out = zend_string_truncate(out, Z.total_out, 0); out->val[out->len] = '\0'; return out; } else { |