tony2001 Mon Jun 26 22:53:10 2006 UTC
Modified files: (Branch: PHP_5_2)
/php-src/ext/zlib zlib.c
Log:
don't try to inflate empty strings (and stop segfaulting!)
http://cvs.php.net/viewvc.cgi/php-src/ext/zlib/zlib.c?r1=1.183.2.6.2.1&r2=1.183.2.6.2.2&diff_format=u
Index: php-src/ext/zlib/zlib.c
diff -u php-src/ext/zlib/zlib.c:1.183.2.6.2.1
php-src/ext/zlib/zlib.c:1.183.2.6.2.2
--- php-src/ext/zlib/zlib.c:1.183.2.6.2.1 Thu Jun 15 18:33:09 2006
+++ php-src/ext/zlib/zlib.c Mon Jun 26 22:53:10 2006
@@ -19,7 +19,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: zlib.c,v 1.183.2.6.2.1 2006/06/15 18:33:09 dmitry Exp $ */
+/* $Id: zlib.c,v 1.183.2.6.2.2 2006/06/26 22:53:10 tony2001 Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -531,6 +531,10 @@
return;
}
+ if (!data_len) {
+ RETURN_FALSE;
+ }
+
if (limit < 0) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "length (%ld) must
be greater or equal zero", limit);
RETURN_FALSE;
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php