From: Antony Dovgal Date: Mon, 25 Dec 2006 20:03:43 +0000 (+0000) Subject: MFH X-Git-Tag: php-5.2.1RC2~80 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=35db4d21b0f6ef6393941a1a6a7bd036a572ce5e;p=php MFH --- diff --git a/ext/bz2/bz2.c b/ext/bz2/bz2.c index 4b76fc2871..90ab5c8c0f 100644 --- a/ext/bz2/bz2.c +++ b/ext/bz2/bz2.c @@ -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; }