]> granicus.if.org Git - php/commitdiff
apply proper fix of bug #43793 to zlib.deflate (window+16 = gzip)
authorGreg Beaver <cellog@php.net>
Wed, 9 Jan 2008 08:12:15 +0000 (08:12 +0000)
committerGreg Beaver <cellog@php.net>
Wed, 9 Jan 2008 08:12:15 +0000 (08:12 +0000)
ext/zlib/zlib_filter.c

index 68d9b15f7d5cb33ea0e9c247853d0a86bb249e80..0bb2f170a44f62aba421b6d8bed34be79938bfa6 100644 (file)
@@ -379,7 +379,7 @@ static php_stream_filter *php_zlib_filter_create(const char *filtername, zval *f
                                                /* log-2 base of history window (9 - 15) */
                                                SEPARATE_ZVAL(tmpzval);
                                                convert_to_long_ex(tmpzval);
-                                               if (Z_LVAL_PP(tmpzval) < -MAX_WBITS || Z_LVAL_PP(tmpzval) > MAX_WBITS + 32) {
+                                               if (Z_LVAL_PP(tmpzval) < -MAX_WBITS || Z_LVAL_PP(tmpzval) > MAX_WBITS + 16) {
                                                        php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid parameter give for window size. (%ld)", Z_LVAL_PP(tmpzval));
                                                } else {
                                                        windowBits = Z_LVAL_PP(tmpzval);