diff options
-rw-r--r-- | ext/standard/php_smart_str.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/standard/php_smart_str.h b/ext/standard/php_smart_str.h index 9626abd982..fce92af818 100644 --- a/ext/standard/php_smart_str.h +++ b/ext/standard/php_smart_str.h @@ -27,8 +27,8 @@ if (!d->c) d->len = d->a = 0; \ newlen = d->len + n; \ if (newlen >= d->a) {\ - d->c = perealloc(d->c, n + 129, what); \ - d->a = n + 128; \ + d->c = perealloc(d->c, newlen + 129, what); \ + d->a = newlen + 128; \ }\ } |