Hi Hannes

you wrote:
> That comment seems to have been rejected..

That's strange. As I believe the note is valid and important, I
resubmitted it with slightly different wording. For reference, and in
case it gets rejected again, I attached it below.

Regards,

Felix

With PHP 5.3 running on 32bit LINUX, I cannot reproduce the issues
reported by @akniep. The code below correctly outputs:

10000000
10000000
0
0

<?php

function tryToGzinflate($deflatedData, $maxLen = 0) {
  $data = gzinflate($deflatedData, $maxLen);
  echo strlen($data).'<br>';
}

$data = '';
for ($i = 0; $i < 10000000; $i++)
  $data .= chr(mt_rand(97, 122)); // a-z

$deflatedData = gzdeflate($data);

tryToGzinflate($deflatedData);
tryToGzinflate($deflatedData, strlen($data));
tryToGzinflate($deflatedData, 100);
ini_set('memory_limit', '100');
tryToGzinflate($deflatedData, 100);
tryToGzinflate($deflatedData); // causes fatal out-of-memory error

-- 
PHP Webmaster List Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to