ID:               47179
 User updated by:  wharmby at uk dot ibm dot com
 Reported By:      wharmby at uk dot ibm dot com
 Status:           Open
 Bug Type:         Zlib Related
 Operating System: Windows XP
 PHP Version:      6CVS-2009-01-21 (snap)
 New Comment:

New test dropped into php 5.2, 5.3 and 6: 

/ext/zlib/tests/gzuncompress_error1.phpt 

PHP 6 test tagged with XFAIL referencing this defect


Previous Comments:
------------------------------------------------------------------------

[2009-01-21 11:11:17] wharmby at uk dot ibm dot com

Description:
------------
gzuncompress() does not report error if $limit > 0 but too short for
data being uncompressed. 

Problem is PHP specific; test OK on latest php 5.2 and 5.3 snaps.

I will be dropping new PHPT shortly for gzuncompress(); the PHP 6 tests
will be tagged with a XFAIL because of this defect. 

 

Reproduce code:
---------------
<?php
$data = b'string_val';
$compressed = gzcompress($data);
var_dump(gzuncompress($compressed, strlen($data)));
var_dump(gzuncompress($compressed, 1));
?>


Expected result:
----------------
Expected output (based on output for same script when run on 5.2/5.3)

string(10) "string_val"

Warning: gzuncompress(): buffer error in <...> on line 5
bool(false)


Actual result:
--------------
string(10) "string_val"
string(10) "string_val"


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


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

Reply via email to