Use rb_len_t for the line length in rb_io_getline_fast

It was int, which overflows on a line longer than INT_MAX bytes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Hiroshi SHIBATAandClaude Opus 5.5 committed 2026-10-10 16:45:25 +09:00
1 parent ee3d6c987b
commit 3af4f5f695
1 file changed
+1 -1
Notes: git 2026-10-10 07:46:22 +00:00
+1 -1
View File
@@ -4260,7 +4260,7 @@ static VALUE
rb_io_getline_fast(rb_io_t *fptr, rb_encoding *enc, int chomp)
{
VALUE str = Qnil;
int len = 0;
rb_len_t len = 0;
rb_len_t pos = 0;
int cr = 0;