#47179 [NEW]: gzuncompress does not report expcted error
| From: | wharmby at uk dot ibm dot com | Date: | Wed, 21 Jan 2009 11:11:18 +0000 |
| Subject: | #47179 [NEW]: gzuncompress does not report expcted error | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-133099@lists.php.net to get a copy of this message | ||
From: wharmby at uk dot ibm dot com
Operating system: Windows XP
PHP version: 6CVS-2009-01-21 (snap)
PHP Bug Type: Zlib Related
Bug description: gzuncompress does not report expcted error
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 bug report at http://bugs.php.net/?id=47179&edit=1
--
Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=47179&r=trysnapshot52
Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=47179&r=trysnapshot53
Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=47179&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=47179&r=fixedcvs
Fixed in CVS and need be documented: http://bugs.php.net/fix.php?id=47179&r=needdocs
Fixed in release: http://bugs.php.net/fix.php?id=47179&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=47179&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=47179&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=47179&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=47179&r=support
Expected behavior: http://bugs.php.net/fix.php?id=47179&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=47179&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=47179&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=47179&r=globals
PHP 4 support discontinued: http://bugs.php.net/fix.php?id=47179&r=php4
Daylight Savings: http://bugs.php.net/fix.php?id=47179&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=47179&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=47179&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=47179&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=47179&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=47179&r=mysqlcfg