mirror of
https://gitdl.cn/https://github.com/chakralinux/core.git
synced 2025-02-10 12:44:36 +08:00
17 lines
754 B
Diff
17 lines
754 B
Diff
--- a/code/trunk/pcre_exec.c 2014/11/05 15:08:03 1510
|
|
+++ b/code/trunk/pcre_exec.c 2014/11/19 20:57:13 1513
|
|
@@ -1404,8 +1404,11 @@
|
|
condition = TRUE;
|
|
|
|
/* Advance ecode past the assertion to the start of the first branch,
|
|
- but adjust it so that the general choosing code below works. */
|
|
-
|
|
+ but adjust it so that the general choosing code below works. If the
|
|
+ assertion has a quantifier that allows zero repeats we must skip over
|
|
+ the BRAZERO. This is a lunatic thing to do, but somebody did! */
|
|
+
|
|
+ if (*ecode == OP_BRAZERO) ecode++;
|
|
ecode += GET(ecode, 1);
|
|
while (*ecode == OP_ALT) ecode += GET(ecode, 1);
|
|
ecode += 1 + LINK_SIZE - PRIV(OP_lengths)[condcode];
|