mike Tue Oct 25 11:35:24 2005 EDT
Modified files:
/php-src/ext/zlib zlib.c
Log:
- fix the fix
http://cvs.php.net/diff.php/php-src/ext/zlib/zlib.c?r1=1.186&r2=1.187&ty=u
Index: php-src/ext/zlib/zlib.c
diff -u php-src/ext/zlib/zlib.c:1.186 php-src/ext/zlib/zlib.c:1.187
--- php-src/ext/zlib/zlib.c:1.186 Tue Oct 25 11:13:55 2005
+++ php-src/ext/zlib/zlib.c Tue Oct 25 11:35:22 2005
@@ -19,7 +19,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: zlib.c,v 1.186 2005/10/25 15:13:55 mike Exp $ */
+/* $Id: zlib.c,v 1.187 2005/10/25 15:35:22 mike Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -625,7 +625,7 @@
int start_offset = ((do_start && ZLIBG(compression_coding) ==
CODING_GZIP) ? 10 : 0);
int end_offset = (do_end ? 8 : 0);
- outlen = (uint) (sizeof(char) * (str_length / PHP_ZLIB_MODIFIER + 12) +
1); /* leave some room for a trailing \0 */
+ outlen = (uint) (str_length + (str_length / PHP_ZLIB_MODIFIER) + 12 +
1); /* leave some room for a trailing \0 */
if ((outlen + start_offset + end_offset) > *p_buffer_len) {
buffer = (Bytef *) emalloc(outlen + start_offset + end_offset);
} else {
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php