From 8293fd46c309addc74700528ca206742fc288ade Mon Sep 17 00:00:00 2001 From: "K.Kosako" Date: Sat, 27 Aug 2016 14:59:23 +0900 Subject: [PATCH] fix out of bounds read -\xc1\xfb{22} --- src/regparse.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/regparse.c b/src/regparse.c index 1c89df9..dacc74f 100644 --- a/src/regparse.c +++ b/src/regparse.c @@ -2301,8 +2301,10 @@ fetch_range_quantifier(UChar** src, UChar* end, OnigToken* tok, ScanEnv* env) return r; /* 0: normal {n,m}, 2: fixed {n} */ invalid: - if (syn_allow) + if (syn_allow) { + *src = p; return 1; /* OK */ + } else return ONIGERR_INVALID_REPEAT_RANGE_PATTERN; } -- 2.40.0