From:             [EMAIL PROTECTED]
Operating system: Linux (maybe Windows too)
PHP version:      4.0CVS-2002-05-31
PHP Bug Type:     Bzip2 Related
Bug description:  Endless loop with file() when using compress.bzip2 wrapper

Using a simple bzip2 compressed input file like

$ cat test.txt
1 ene
2 mene
3 muh
4 foo

and compressing it with bzip2

$ bzip2 -c test.txt >test.bz2

and then trying to use file() with compress.bzip2 wrapper results in an
infinite loop, i.e. never returned out of file():

$ cat test.php
<?
        print_r(file('compress.bzip2://test.bz2'));
?>

Looking at the code in file() using whil(1) { ... } seems dangerous for
race conditions. But it actually works with e.g. compress.zlib wrapper and
with normal files so I suspect this being a bug in the bz2 wrapper.
-- 
Edit bug report at http://bugs.php.net/?id=17547&edit=1
-- 
Fixed in CVS:        http://bugs.php.net/fix.php?id=17547&r=fixedcvs
Fixed in release:    http://bugs.php.net/fix.php?id=17547&r=alreadyfixed
Need backtrace:      http://bugs.php.net/fix.php?id=17547&r=needtrace
Try newer version:   http://bugs.php.net/fix.php?id=17547&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=17547&r=support
Expected behavior:   http://bugs.php.net/fix.php?id=17547&r=notwrong
Not enough info:     http://bugs.php.net/fix.php?id=17547&r=notenoughinfo
Submitted twice:     http://bugs.php.net/fix.php?id=17547&r=submittedtwice
register_globals:    http://bugs.php.net/fix.php?id=17547&r=globals

Reply via email to