Bug #78527 [NEW]: zlib deflate bug with windowBits == 8

From: Date: Thu, 12 Sep 2019 09:43:34 +0000
Subject: Bug #78527 [NEW]: zlib deflate bug with windowBits == 8
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-222699@lists.php.net to get a copy of this message
From: wcode404 at gmail dot com Operating system: linux PHP version: 7.3.9 Package: Zlib related Bug Type: Bug Bug description:zlib deflate bug with windowBits == 8 Description: ------------ 256-byte windows are broken https://github.com/madler/zlib/issues/171 Test script: --------------- $filename = tempnam(sys_get_temp_dir(), 'zlib'); $expected = 'foo'; // write to file the compress content $context = deflate_init(ZLIB_ENCODING_DEFLATE, ['window' => 8]); file_put_contents($filename, deflate_add($context, $expected)); // read content from file and uncompress it $context = inflate_init(ZLIB_ENCODING_DEFLATE, ['window' => 8]); $actual = inflate_add($context, file_get_contents($filename)); var_dump($expected === $actual); Expected result: ---------------- bool(true) Actual result: -------------- inflate_add(): data error -- Edit bug report at https://bugs.php.net/bug.php?id=78527&edit=1 -- Fix committed: https://bugs.php.net/fix.php?id=78527&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=78527&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=78527&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=78527&r=needscript Try newer version: https://bugs.php.net/fix.php?id=78527&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=78527&r=support Expected behavior: https://bugs.php.net/fix.php?id=78527&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=78527&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=78527&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=78527&r=globals PHP version support discontinued: https://bugs.php.net/fix.php?id=78527&r=phptooold Daylight Savings: https://bugs.php.net/fix.php?id=78527&r=dst IIS Stability: https://bugs.php.net/fix.php?id=78527&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=78527&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=78527&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=78527&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=78527&r=mysqlcfg

« previous php.bugs (#222699) next »