From: Antony Dovgal Date: Tue, 5 Dec 2006 13:45:49 +0000 (+0000) Subject: don't pass negative maxchars to php_stream_get_line_ex() X-Git-Tag: RELEASE_1_0_0RC1~810 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=2f5f37585043d7cb5baf90c65f4923c455887e5d;p=php don't pass negative maxchars to php_stream_get_line_ex() --- diff --git a/ext/standard/file.c b/ext/standard/file.c index c035722609..83c26994e8 100644 --- a/ext/standard/file.c +++ b/ext/standard/file.c @@ -2153,7 +2153,7 @@ PHP_FUNCTION(fgetcsv) } } - 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;