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

index b9333f7752734332b8f9823bd03c69b83b960801..e4a08773d85ca8275a9256d1da34a74849c885f0 100644 (file)
@@ -269,7 +269,7 @@ 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;
        }