aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/pcre/pcre_compile.c
diff options
context:
space:
mode:
authorRickard Green <[email protected]>2019-07-02 19:31:44 +0200
committerRickard Green <[email protected]>2019-07-02 19:31:44 +0200
commit8f8157d6f93779ef4c43c4de1a6c4a6c4ca847da (patch)
tree2cb259dc143fe7d6a4e464775ab6da0eb70c1a0b /erts/emulator/pcre/pcre_compile.c
parent9ca78c390dcbbf79631b45c3cad90b19a5692bbe (diff)
parent5371644cf6a4175e332ff0eb0c9a7227803e7fe2 (diff)
downloadotp-8f8157d6f93779ef4c43c4de1a6c4a6c4ca847da.tar.gz
otp-8f8157d6f93779ef4c43c4de1a6c4a6c4ca847da.tar.bz2
otp-8f8157d6f93779ef4c43c4de1a6c4a6c4ca847da.zip
Merge branch 'maint'
* maint: Updated stdlib runtime dependency to erts Convert generated re replace and split tests from latin1 to UTF8 Adjust generated re replacement and split tests Generate new re replacement and split tests using perl 5.22.1 Update internal PCRE to version 8.43
Diffstat (limited to 'erts/emulator/pcre/pcre_compile.c')
-rw-r--r--erts/emulator/pcre/pcre_compile.c18
1 files changed, 14 insertions, 4 deletions
diff --git a/erts/emulator/pcre/pcre_compile.c b/erts/emulator/pcre/pcre_compile.c
index ae7f6e2a2a..6ac222b27e 100644
--- a/erts/emulator/pcre/pcre_compile.c
+++ b/erts/emulator/pcre/pcre_compile.c
@@ -6,7 +6,7 @@
and semantics are as close as possible to those of the Perl 5 language.
Written by Philip Hazel
- Copyright (c) 1997-2016 University of Cambridge
+ Copyright (c) 1997-2018 University of Cambridge
-----------------------------------------------------------------------------
Redistribution and use in source and binary forms, with or without
@@ -3300,7 +3300,7 @@ for(;;)
if ((*xclass_flags & XCL_MAP) == 0)
{
/* No bits are set for characters < 256. */
- if (list[1] == 0) return TRUE;
+ if (list[1] == 0) return (*xclass_flags & XCL_NOT) == 0;
/* Might be an empty repeat. */
continue;
}
@@ -7643,6 +7643,8 @@ for (;; ptr++)
/* Can't determine a first byte now */
if (firstcharflags == REQ_UNSET) firstcharflags = REQ_NONE;
+ zerofirstchar = firstchar;
+ zerofirstcharflags = firstcharflags;
continue;
@@ -8683,10 +8685,18 @@ do {
if (!is_anchored(scode, new_map, cd, atomcount)) return FALSE;
}
- /* Positive forward assertions and conditions */
+ /* Positive forward assertion */
- else if (op == OP_ASSERT || op == OP_COND)
+ else if (op == OP_ASSERT)
+ {
+ if (!is_anchored(scode, bracket_map, cd, atomcount)) return FALSE;
+ }
+
+ /* Condition; not anchored if no second branch */
+
+ else if (op == OP_COND)
{
+ if (scode[GET(scode,1)] != OP_ALT) return FALSE;
if (!is_anchored(scode, bracket_map, cd, atomcount)) return FALSE;
}