cvs: php-src(PHP_5_2) / NEWS /ext/standard file.c

From: Date: Fri, 18 May 2007 12:06:44 +0000
Subject: cvs: php-src(PHP_5_2) / NEWS /ext/standard file.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-44363@lists.php.net to get a copy of this message
tony2001 Fri May 18 12:06:44 2007 UTC Modified files: (Branch: PHP_5_2) /php-src/ext/standard file.c /php-src NEWS Log: MFH: fix #41430 (Fatal error with negative values of maxlen parameter of file_get_contents()) http://cvs.php.net/viewvc.cgi/php-src/ext/standard/file.c?r1=1.409.2.6.2.17&r2=1.409.2.6.2.18&diff_format=u Index: php-src/ext/standard/file.c diff -u php-src/ext/standard/file.c:1.409.2.6.2.17 php-src/ext/standard/file.c:1.409.2.6.2.18 --- php-src/ext/standard/file.c:1.409.2.6.2.17 Fri Feb 23 16:22:20 2007 +++ php-src/ext/standard/file.c Fri May 18 12:06:44 2007 @@ -21,7 +21,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: file.c,v 1.409.2.6.2.17 2007/02/23 16:22:20 tony2001 Exp $ */ +/* $Id: file.c,v 1.409.2.6.2.18 2007/05/18 12:06:44 tony2001 Exp $ */ /* Synced with php 3.0 revision 1.218 1999-06-16 [ssb] */ @@ -545,6 +545,11 @@ RETURN_FALSE; } + if (maxlen < 0) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Length must be greater than or equal to zero"); + RETURN_FALSE; + } + if (offset > 0 && php_stream_seek(stream, offset, SEEK_SET) < 0) { php_error_docref(NULL TSRMLS_CC, E_WARNING, "Failed to seek to position %ld in the stream", offset); php_stream_close(stream); http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.716&r2=1.2027.2.547.2.717&diff_format=u Index: php-src/NEWS diff -u php-src/NEWS:1.2027.2.547.2.716 php-src/NEWS:1.2027.2.547.2.717 --- php-src/NEWS:1.2027.2.547.2.716 Fri May 18 11:52:47 2007 +++ php-src/NEWS Fri May 18 12:06:44 2007 @@ -17,6 +17,8 @@ - Fixed altering $this via argument named "this". (Dmitry) - Fixed PHP CLI to use the php.ini from the binary location. (Hannes) - Fixed segfault in strripos(). (Tony, Joxean Koret) +- Fixed bug #41430 (Fatal error with negative values of maxlen parameter of + file_get_contents()). (Tony) - Fixed bug #41421 (Uncaught exception from a stream wrapper segfaults). (Tony, Dmitry) - Fixed bug #41403 (json_decode cannot decode floats if localeconv

« previous php.cvs (#44363) next »