]> granicus.if.org Git - onig/commitdiff
fix: add data ensure check before peek string value in OP_PUSH_IF_PEEK_NEXT
authorK.Kosako <kosako@sofnec.co.jp>
Fri, 20 Sep 2019 06:02:11 +0000 (15:02 +0900)
committerK.Kosako <kosako@sofnec.co.jp>
Fri, 20 Sep 2019 06:02:11 +0000 (15:02 +0900)
src/regexec.c

index 40642c7d5670a23793166cb7a5dd7798be1fef87..f8bccc3c03757492898acea34dd732f96a4c8f0f 100644 (file)
@@ -3759,7 +3759,7 @@ match_at(regex_t* reg, const UChar* str, const UChar* end,
 
         addr = p->push_if_peek_next.addr;
         c    = p->push_if_peek_next.c;
-        if (c == *s) {
+        if (DATA_ENSURE_CHECK1 && c == *s) {
           STACK_PUSH_ALT(p + addr, s, sprev);
           INC_OP;
           JUMP_OUT;