ob_gzhandler does not enforce trailing NUL
| Bug #34191 | ob_gzhandler does not enforce trailing NUL | ||||
|---|---|---|---|---|---|
| Submitted: | 2005-08-19 13:41 UTC | Modified: | 2005-08-24 18:20 UTC | ||
| From: | mike@php.net | Assigned: | iliaa (profile) | ||
| Status: | Closed | Package: | Zlib related | ||
| PHP Version: | 5CVS-2005-08-24 (CVS) | OS: | |||
| Private report: | No | CVE-ID: | None | ||
Patches
Pull Requests
History
AllCommentsChangesGit/SVN commits
[2005-08-19 14:38 UTC] mike@php.net
Reproducing script: <?php function f() { $data = ob_get_contents(); while(@ob_end_clean()); ob_start('ob_gzhandler'); $step = strlen($data)/2; echo substr($data, 0, $step); ob_flush(); echo substr($data, $step); } register_shutdown_function('f'); ob_start(); echo '<pre>'; readfile(__FILE__); ?>[2005-08-21 18:05 UTC] iliaa@php.net
[2005-08-24 12:37 UTC] mike@php.net
Sorry, this bug is not entirely fixed. Reproducing Script: Similar to the previous one, but with an additional ob_end_clean() <?php function f() { $data = ob_get_contents(); while(@ob_end_clean()); ob_start('ob_gzhandler'); $step = strlen($data)/2; echo substr($data, 0, $step); ob_flush(); echo substr($data, $step); } register_shutdown_function('f'); while(@ob_end_clean()); ob_start(); echo '<pre>'; readfile(__FILE__); ?>[2005-08-24 14:43 UTC] sniper@php.net
[2005-08-24 18:20 UTC] iliaa@php.net