tony2001 Tue Dec 5 13:45:49 2006 UTC Modified files: /php-src/ext/standard file.c Log: don't pass negative maxchars to php_stream_get_line_ex() http://cvs.php.net/viewvc.cgi/php-src/ext/standard/file.c?r1=1.471&r2=1.472&diff_format=u Index: php-src/ext/standard/file.c diff -u php-src/ext/standard/file.c:1.471 php-src/ext/standard/file.c:1.472 --- php-src/ext/standard/file.c:1.471 Tue Dec 5 04:52:44 2006 +++ php-src/ext/standard/file.c Tue Dec 5 13:45:49 2006 @@ -21,7 +21,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: file.c,v 1.471 2006/12/05 04:52:44 pollita Exp $ */ +/* $Id: file.c,v 1.472 2006/12/05 13:45:49 tony2001 Exp $ */ /* Synced with php 3.0 revision 1.218 1999-06-16 [ssb] */ @@ -2153,7 +2153,7 @@ } } - buf.v = php_stream_get_line_ex(stream, stream->readbuf_type, NULL_ZSTR, 0, len, &buf_len); + buf.v = php_stream_get_line_ex(stream, stream->readbuf_type, NULL_ZSTR, 0, (len < 0) ? 0 : len, &buf_len); if (!buf.v) { /* No data */ RETVAL_FALSE;
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php