mirror of
https://github.com/fish-shell/fish-shell
synced 2025-01-13 05:28:49 +00:00
Apply pcre2 svn rev 489 patch to fix CVE-2016-3191
This commit is contained in:
parent
aefcf544ca
commit
fc78e70d08
1 changed files with 13 additions and 3 deletions
|
@ -4866,7 +4866,6 @@ for (;; ptr++)
|
||||||
|
|
||||||
/* For a single, positive character, get the value into mcbuffer, and
|
/* For a single, positive character, get the value into mcbuffer, and
|
||||||
then we can handle this with the normal one-character code. */
|
then we can handle this with the normal one-character code. */
|
||||||
|
|
||||||
mclength = PUTCHAR(c, mcbuffer);
|
mclength = PUTCHAR(c, mcbuffer);
|
||||||
goto ONE_CHAR;
|
goto ONE_CHAR;
|
||||||
} /* End of 1-char optimization */
|
} /* End of 1-char optimization */
|
||||||
|
@ -5899,11 +5898,22 @@ for (;; ptr++)
|
||||||
goto FAILED;
|
goto FAILED;
|
||||||
}
|
}
|
||||||
cb->had_accept = TRUE;
|
cb->had_accept = TRUE;
|
||||||
|
/* In the first pass, just accumulate the length required;
|
||||||
|
otherwise hitting (*ACCEPT) inside many nested parentheses can
|
||||||
|
cause workspace overflow. */
|
||||||
for (oc = cb->open_caps; oc != NULL; oc = oc->next)
|
for (oc = cb->open_caps; oc != NULL; oc = oc->next)
|
||||||
{
|
{
|
||||||
*code++ = OP_CLOSE;
|
if (lengthptr != NULL)
|
||||||
PUT2INC(code, 0, oc->number);
|
{
|
||||||
|
*lengthptr += CU2BYTES(1) + IMM2_SIZE;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
*code++ = OP_CLOSE;
|
||||||
|
PUT2INC(code, 0, oc->number);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
setverb = *code++ =
|
setverb = *code++ =
|
||||||
(cb->assert_depth > 0)? OP_ASSERT_ACCEPT : OP_ACCEPT;
|
(cb->assert_depth > 0)? OP_ASSERT_ACCEPT : OP_ACCEPT;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue