Skip to content
  • Yusuke Endoh's avatar
    1d2d25dc
    Prevent potential buffer overrun in onigmo · 1d2d25dc
    Yusuke Endoh authored
    
    
    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: default avatarNobuyoshi Nakada <nobu@ruby-lang.org>
    1d2d25dc
    Prevent potential buffer overrun in onigmo
    Yusuke Endoh authored
    
    
    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: default avatarNobuyoshi Nakada <nobu@ruby-lang.org>
Loading