]> granicus.if.org Git - php/commitdiff
MFH
authorAntony Dovgal <tony2001@php.net>
Mon, 25 Dec 2006 20:03:43 +0000 (20:03 +0000)
committerAntony Dovgal <tony2001@php.net>
Mon, 25 Dec 2006 20:03:43 +0000 (20:03 +0000)
ext/bz2/bz2.c

index 4b76fc2871a8a2332d08a90198ce85cb6d72885d..90ab5c8c0f2797b4ada6b736e985f654c66c60f9 100644 (file)
@@ -330,7 +330,7 @@ static PHP_FUNCTION(bzread)
        
        php_stream_from_zval(stream, &bz);
 
-       if (len < 0) {
+       if ((len + 1) < 1) {
                php_error_docref(NULL TSRMLS_CC, E_WARNING, "length may not be negative");
                RETURN_FALSE;
        }