From e7cbc6ee95694957a0f252ab70ca7d24a3d1492c Mon Sep 17 00:00:00 2001 From: Diomidis Spinellis Date: Wed, 16 Sep 2009 06:32:23 +0000 Subject: [PATCH] Fix an off-by-one error in the marking of the O_CH operator following an OOR2 operator. PR: 130504 MFC after: 2 weeks --- lib/libc/regex/engine.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/libc/regex/engine.c b/lib/libc/regex/engine.c index 4c3f5550aaaf..2a1a75e0b1d6 100644 --- a/lib/libc/regex/engine.c +++ b/lib/libc/regex/engine.c @@ -1075,7 +1075,7 @@ step(struct re_guts *g, OP(s = g->strip[pc+look]) != O_CH; look += OPND(s)) assert(OP(s) == OOR2); - FWD(aft, aft, look); + FWD(aft, aft, look + 1); } break; case OOR2: /* propagate OCH_'s marking */