cvs: php4 /ext/standard php_smart_str.h
| From: | Sascha Schumann | Date: | Tue, 14 Nov 2000 20:34:15 +0000 |
| Subject: | cvs: php4 /ext/standard php_smart_str.h | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-2610@lists.php.net to get a copy of this message | ||
sas Tue Nov 14 12:34:15 2000 EDT
Modified files:
/php4/ext/standard php_smart_str.h
Log:
Fix allocation
Index: php4/ext/standard/php_smart_str.h
diff -u php4/ext/standard/php_smart_str.h:1.4 php4/ext/standard/php_smart_str.h:1.5
--- php4/ext/standard/php_smart_str.h:1.4 Tue Nov 14 07:36:18 2000
+++ php4/ext/standard/php_smart_str.h Tue Nov 14 12:34:14 2000
@@ -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; \
}\
}