Fix infinite loop at illegal sequence [Bug #17729] As mblen returns -1 on failure, skip the first byte and try the succeeding bytes in that case. Close https://github.com/ruby/ruby/pull/4281 --- eval_intern.h | 11 ++++++++++- test/ruby/test_rubyoptions.rb | 5 +++++ 2 files changed, 15 insertions(+), 1 deletion(-)
Related issues
Bug #17729: Fix infinite loop when parsing RUBYLIB with locale-invalid bytes
merge revision(s) f748b911c9157a0bb86f38280ddfba72a55049b6: [Backport #17729]