iliaa Thu Jan 1 19:58:16 2004 EDT Modified files: (Branch: PHP_4_3) /php-src NEWS /php-src/ext/standard file.c Log: MFH: Fixed bug #26752 (Silent unterminated loop when length parameter for fgets(), fread() and fgetss() is 0). Index: php-src/NEWS diff -u php-src/NEWS:1.1247.2.514 php-src/NEWS:1.1247.2.515 --- php-src/NEWS:1.1247.2.514 Wed Dec 31 06:28:39 2003 +++ php-src/NEWS Thu Jan 1 19:58:14 2004 @@ -10,6 +10,8 @@ - Added a warning when creating temp stream fails with ftp_(n)list(). (Sara) - Fixed header handler in NSAPI SAPI module (header->replace was ignored, send_default_content_type now sends value from php.ini). (Uwe Schindler) +- Fixed bug #26752 (Silent unterminated loop when length parameter for + fgets(), fread() and fgetss() is 0). (Ilia) - Fixed bug #26751 (PHP can't find the MySQL socket on a case sensitive file system). (Derick) - Fixed Bug #26703 (Certain characters inside strings incorrectly treated as Index: php-src/ext/standard/file.c diff -u php-src/ext/standard/file.c:1.279.2.50 php-src/ext/standard/file.c:1.279.2.51 --- php-src/ext/standard/file.c:1.279.2.50 Sun Dec 28 14:31:48 2003 +++ php-src/ext/standard/file.c Thu Jan 1 19:58:15 2004 @@ -21,7 +21,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: file.c,v 1.279.2.50 2003/12/28 19:31:48 iliaa Exp $ */ +/* $Id: file.c,v 1.279.2.51 2004/01/02 00:58:15 iliaa Exp $ */ /* Synced with php 3.0 revision 1.218 1999-06-16 [ssb] */ @@ -1374,8 +1374,8 @@ convert_to_long_ex(arg2); len = Z_LVAL_PP(arg2); - if (len < 0) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Length parameter may not be negative"); + if (len <= 0) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Length parameter must be greater then 0."); RETURN_FALSE; } @@ -1471,8 +1471,8 @@ convert_to_long_ex(bytes); len = Z_LVAL_PP(bytes); - if (len < 0) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Length parameter may not be negative"); + if (len <= 0) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Length parameter must be greater then 0."); RETURN_FALSE; } @@ -2136,8 +2136,8 @@ convert_to_long_ex(arg2); len = Z_LVAL_PP(arg2); - if (len < 0) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Length parameter may not be negative"); + if (len <= 0) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Length parameter must be greater then 0."); RETURN_FALSE; }
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php