From: K.Kosako Date: Sat, 27 Aug 2016 01:25:25 +0000 (+0900) Subject: fix out of bounds read /(\k'k-0/ X-Git-Tag: v6.1.0~13 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=162cf9124ba3bfaa21d53ebc506f3d9354bfa99b;p=onig fix out of bounds read /(\k'k-0/ --- diff --git a/src/regparse.c b/src/regparse.c index 1b1427e..1c89df9 100644 --- a/src/regparse.c +++ b/src/regparse.c @@ -2485,9 +2485,11 @@ fetch_name_with_level(OnigCodePoint start_code, UChar** src, UChar* end, *rlevel = (level * flag); exist_level = 1; - PFETCH(c); - if (c == end_code) - goto end; + if (!PEND) { + PFETCH(c); + if (c == end_code) + goto end; + } } err: