Bug #61287 [Asn->Csd]: A particular string fails to decompress
| From: | mike@php.net | Date: | Mon, 05 Mar 2012 15:40:06 +0000 |
| Subject: | Bug #61287 [Asn->Csd]: A particular string fails to decompress | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-168154@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=61287&edit=1
ID: 61287
Updated by: mike@php.net
Reported by: yoozer at gmail dot com
Summary: A particular string fails to decompress
-Status: Assigned
+Status: Closed
Type: Bug
Package: Zlib related
Operating System: *
PHP Version: 5.4.0
Assigned To: mike
Block user comment: N
Private report: N
New Comment:
This bug has been fixed in SVN.
Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
For Windows:
http://windows.php.net/snapshots/
Thank you for the report, and for helping us make PHP better.
Previous Comments:
------------------------------------------------------------------------
[2012-03-05 15:38:16] mike@php.net
Automatic comment from SVN on behalf of mike
Revision: http://svn.php.net/viewvc/?view=revision&revision=323917
Log: MFH: Fixed bug #61287 (A particular string fails to decompress)
------------------------------------------------------------------------
[2012-03-05 15:35:15] mike@php.net
Automatic comment from SVN on behalf of mike
Revision: http://svn.php.net/viewvc/?view=revision&revision=323916
Log: fix bug #61287 (A particular string fails to decompress)
------------------------------------------------------------------------
[2012-03-05 15:00:14] pajoye@php.net
Not win specific, confirmed on other OSes too.
------------------------------------------------------------------------
[2012-03-05 14:14:50] yoozer at gmail dot com
Description:
------------
We use gzdeflate to compress search parameters. When we recently upgraded from 5.3.8 to 5.4, a slew
of error messages appeared. See the test script below. We've tried to minimize it, but any
changes do not cause the error to trigger.
Changing the variable name "region_id" to "egion_id" results in 90.
Changing the variable name "region_id" to "tegion_id" causes the same error.
Changing the variable name "discipline" to "isciplined" results in 92.
Changing the value assigned to region_id from 1 to 2 results in 92.
Changing the value assigned to region_id from 1 to 4 results in an error.
Test script:
---------------
$array = array(
'region_id' => 1,
'discipline' => 23,
'degrees' => array(),
'country_id' => 27
);
$serialized = serialize($array);
$deflated = gzdeflate($serialized, 9);
$inflated = gzinflate($deflated);
echo strlen($inflated);
Expected result:
----------------
Expected: 92
Actual result:
--------------
Warning: gzinflate(): data error in D:\Web\Projects\Bench\index.php on line 13
0
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=61287&edit=1