mirror of
https://github.com/php/php-src.git
synced 2024-09-21 18:07:23 +00:00
deflate_add(): Don't add unnecessary +1 to size
zend_string_realloc will do this by itself.
This commit is contained in:
parent
ec1b7b933d
commit
b36f4ac708
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user