Actions
Bug #4586
closedMissing length check in rb_str_each_line?
Description
=begin
In rb_str_each line, the following test is performed:
(rslen <= 1 || memcmp(RSTRING_PTR(rs), p, rslen) == 0)
Shouldn’t it be
(rslen <= 1 ||
(pend - p >= rslen && memcmp(RSTRING_PTR(rs), p, rslen) == 0))
?
=end
Actions
Like0
Like0