Var capture setup depended on the match being relative due to a logic
error.
sm->ctx = (void *)pd;
SigMatchAppendSMToList(s, sm, sm_list);
+ if (pd->capidx != 0) {
+ if (DetectFlowvarPostMatchSetup(s, pd->capidx) < 0)
+ goto error_nofree;
+ }
+
if (!(pd->flags & DETECT_PCRE_RELATIVE))
goto okay;
tmp->flags |= DETECT_PCRE_RELATIVE_NEXT;
}
- if (pd->capidx != 0) {
- if (DetectFlowvarPostMatchSetup(s, pd->capidx) < 0)
- goto error_nofree;
- }
-
okay:
ret = 0;
SCReturnInt(ret);