Skip to content

Commit

Permalink
Fix caseless "not" bug for wide character in DFA matching when UCP no…
Browse files Browse the repository at this point in the history
…t defined.

git-svn-id: svn:https://vcs.exim.org/pcre/code/trunk@1714 2f5784b3-3f2a-0410-8824-cb99058d5e15
  • Loading branch information
ph10 committed Nov 16, 2017
1 parent bfd4f2b commit 22f62c9
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
5 changes: 5 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,11 @@ processing files with the -r option, and also (some very odd code) truncating
path names to 512 characters. There is now a check on the absolute length of
full path file names, which may be up to 2047 characters long.

4. Using pcre_dfa_exec(), in UTF mode when UCP support was not defined, there
was the possibility of a false positive match when caselessly matching a "not
this character" item such as [^\x{1234}] (with a code point greater than 127)
because the "other case" variable was not being initialized.


Version 8.41 05-July-2017
-------------------------
Expand Down
4 changes: 3 additions & 1 deletion pcre_dfa_exec.c
Original file line number Diff line number Diff line change
Expand Up @@ -2287,12 +2287,14 @@ for (;;)
case OP_NOTI:
if (clen > 0)
{
unsigned int otherd;
pcre_uint32 otherd;
#ifdef SUPPORT_UTF
if (utf && d >= 128)
{
#ifdef SUPPORT_UCP
otherd = UCD_OTHERCASE(d);
#else
otherd = d;
#endif /* SUPPORT_UCP */
}
else
Expand Down

0 comments on commit 22f62c9

Please sign in to comment.