lbarnaud Mon Aug 18 03:54:50 2008 UTC Modified files: /php-src/main output.c Log: update buffer size after having effectively realloc()ed it when appending data to an output buffer # may caused some problems if erealloc() failed here because of memory # limit ("memory limit exhausted" error message then written to # the buffer, etc) http://cvs.php.net/viewvc.cgi/php-src/main/output.c?r1=1.210&r2=1.211&diff_format=u Index: php-src/main/output.c diff -u php-src/main/output.c:1.210 php-src/main/output.c:1.211 --- php-src/main/output.c:1.210 Tue Mar 4 23:39:15 2008 +++ php-src/main/output.c Mon Aug 18 03:54:49 2008 @@ -19,7 +19,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: output.c,v 1.210 2008/03/04 23:39:15 felipe Exp $ */ +/* $Id: output.c,v 1.211 2008/08/18 03:54:49 lbarnaud Exp $ */ #ifndef PHP_OUTPUT_DEBUG # define PHP_OUTPUT_DEBUG 0 @@ -913,7 +913,8 @@ size_t grow_buf = PHP_OUTPUT_HANDLER_INITBUF_SIZE(buf->used - (handler->buffer.size - handler->buffer.used)); size_t grow_max = MAX(grow_int, grow_buf); - handler->buffer.data = erealloc(handler->buffer.data, handler->buffer.size += grow_max); + handler->buffer.data = erealloc(handler->buffer.data, handler->buffer.size + grow_max); + handler->buffer.size += grow_max; } memcpy(handler->buffer.data + handler->buffer.used, buf->data, buf->used); handler->buffer.used += buf->used;
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php