Bug #17547 Updated: Endless loop with file() when using compress.bzip2 wrapper

From: Date: Fri, 31 May 2002 21:37:12 +0000
Subject: Bug #17547 Updated: Endless loop with file() when using compress.bzip2 wrapper
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-9019@lists.php.net to get a copy of this message
ID: 17547 Updated by: mfischer@php.net Reported By: mfischer@php.net -Status: Open +Status: Critical Bug Type: Bzip2 Related Operating System: Linux (maybe Windows too) PHP Version: 4.0CVS-2002-05-31 Previous Comments: ------------------------------------------------------------------------ [2002-05-31 17:36:59] mfischer@php.net 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 this bug report at http://bugs.php.net/?id=17547&edit=1

« previous php.bugs (#9019) next »