Bug #75807 [Opn]: deflate_init fails with window bits set to 8

From: Date: Fri, 12 Jan 2018 02:22:39 +0000
Subject: Bug #75807 [Opn]: deflate_init fails with window bits set to 8
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-213484@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=75807&edit=1

 ID:                 75807
 User updated by:    matt at bonneau dot net
 Reported by:        matt at bonneau dot net
 Summary:            deflate_init fails with window bits set to 8
 Status:             Open
 Type:               Bug
 Package:            Zlib related
 PHP Version:        master-Git-2018-01-12 (Git)
 Block user comment: N
 Private report:     N

 New Comment:

Output should actually be:
Warning: deflate_init(): zlib window size (logarithm) (8) must be within 9..15


Previous Comments:
------------------------------------------------------------------------
[2018-01-12 02:09:40] matt at bonneau dot net

Description:
------------
Newer versions of zlib reject an 8 bit window. Minimum value should be changed to 9 instead of 8.
This failure was noticed with zlib 1.2.8.

Test script:
---------------
<?php
deflate_init(
    ZLIB_ENCODING_RAW,
    [
        'window'   => 8,
    ]
);

Expected result:
----------------
Expect no output.

Actual result:
--------------
Warning: deflate_init(): failed allocating zlib.deflate context in test3.php on line 5


------------------------------------------------------------------------



--
Edit this bug report at https://bugs.php.net/bug.php?id=75807&edit=1


Thread (4 messages)

« previous php.bugs (#213484) next »