Fix pattern overrun in utf extended mode for a # comment that hit the end.
This commit is contained in:
parent
2aa482039a
commit
0ea3274a53
|
@ -117,6 +117,10 @@ when the POSIX API was in use.
|
|||
compiled. A non-installed binary to run the test function locally, called
|
||||
pcre2fuzzcheck is also compiled.
|
||||
|
||||
18. In UTF-8 or UTF-16 modes with PCRE2_EXTENDED (/x) set and a non-zero-
|
||||
terminated pattern, if a # comment ran on to the end of the pattern, one or
|
||||
more code units past the end were being read.
|
||||
|
||||
|
||||
Version 10.22 29-July-2016
|
||||
--------------------------
|
||||
|
|
|
@ -2326,7 +2326,7 @@ while (ptr < ptrend)
|
|||
}
|
||||
ptr++;
|
||||
#ifdef SUPPORT_UNICODE
|
||||
if (utf) FORWARDCHAR(ptr);
|
||||
if (utf) FORWARDCHARTEST(ptr, ptrend);
|
||||
#endif
|
||||
}
|
||||
continue; /* Next character in pattern */
|
||||
|
|
|
@ -1731,6 +1731,8 @@
|
|||
|
||||
/'(*UTF)'/hex
|
||||
|
||||
/'#('/hex,extended,utf
|
||||
|
||||
/a(?<=A\XB)/utf
|
||||
|
||||
/ab(?<=A\RB)/utf
|
||||
|
|
|
@ -4167,6 +4167,8 @@ No match
|
|||
|
||||
/'(*UTF)'/hex
|
||||
|
||||
/'#('/hex,extended,utf
|
||||
|
||||
/a(?<=A\XB)/utf
|
||||
Failed: error 125 at offset 1: lookbehind assertion is not fixed length
|
||||
|
||||
|
|
Loading…
Reference in New Issue