mirror of
https://github.com/php/php-src.git
synced 2025-01-11 05:24:49 +08:00
don't pass negative maxchars to php_stream_get_line_ex()
This commit is contained in:
parent
07cbe3317a
commit
2f5f375850
@ -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) {
|
if (!buf.v) {
|
||||||
/* No data */
|
/* No data */
|
||||||
RETVAL_FALSE;
|
RETVAL_FALSE;
|
||||||
|
Loading…
Reference in New Issue
Block a user