1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00
ruby--ruby/include
Yusuke Endoh 1d2d25dcad Prevent potential buffer overrun in onigmo
A code pattern `p + enclen(enc, p, pend)` may lead to a buffer overrun
if incomplete bytes of a UTF-8 character is placed at the end of a
string. Because this pattern is used in several places in onigmo,
this change fixes the issue in the side of `enclen`: the function should
not return a number that is larger than `pend - p`.

Co-Authored-By: Nobuyoshi Nakada <nobu@ruby-lang.org>
2022-10-25 17:02:43 +09:00
..
ruby Prevent potential buffer overrun in onigmo 2022-10-25 17:02:43 +09:00
ruby.h include/ruby.h: skip doxygen 2021-09-10 20:00:06 +09:00