Skip to content
Permalink
Browse files

fix out of bounds read in mbc_to_code() #16

  • Loading branch information...
kkos committed Aug 21, 2016
1 parent 2e81a00 commit 65bdf2a0d160d06556415e5f396a75f6b11bad5c
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/utf8.c
@@ -98,7 +98,7 @@ mbc_to_code(const UChar* p, const UChar* end ARG_UNUSED)

len = enclen(ONIG_ENCODING_UTF8, p);
c = *p++;
if (len > 1) {
if (len > 1 && p < end) {
len--;
n = c & ((1 << (6 - len)) - 1);
while (len--) {

0 comments on commit 65bdf2a

Please sign in to comment.
You can’t perform that action at this time.