Skip to content

Commit 9d4fe96

Browse files
committed
upgraded to PCRE 8.39
1 parent 9d92d05 commit 9d4fe96

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

61 files changed

+6077
-4339
lines changed

ext/pcre/pcrelib/AUTHORS

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Email domain: cam.ac.uk
88
University of Cambridge Computing Service,
99
Cambridge, England.
1010

11-
Copyright (c) 1997-2015 University of Cambridge
11+
Copyright (c) 1997-2016 University of Cambridge
1212
All rights reserved
1313

1414

@@ -19,7 +19,7 @@ Written by: Zoltan Herczeg
1919
Email local part: hzmester
2020
Emain domain: freemail.hu
2121

22-
Copyright(c) 2010-2015 Zoltan Herczeg
22+
Copyright(c) 2010-2016 Zoltan Herczeg
2323
All rights reserved.
2424

2525

@@ -30,7 +30,7 @@ Written by: Zoltan Herczeg
3030
Email local part: hzmester
3131
Emain domain: freemail.hu
3232

33-
Copyright(c) 2009-2015 Zoltan Herczeg
33+
Copyright(c) 2009-2016 Zoltan Herczeg
3434
All rights reserved.
3535

3636

ext/pcre/pcrelib/ChangeLog

Lines changed: 93 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,104 @@ ChangeLog for PCRE
44
Note that the PCRE 8.xx series (PCRE1) is now in a bugfix-only state. All
55
development is happening in the PCRE2 10.xx series.
66

7+
Version 8.39 14-June-2016
8+
-------------------------
9+
10+
1. If PCRE_AUTO_CALLOUT was set on a pattern that had a (?# comment between
11+
an item and its qualifier (for example, A(?#comment)?B) pcre_compile()
12+
misbehaved. This bug was found by the LLVM fuzzer.
13+
14+
2. Similar to the above, if an isolated \E was present between an item and its
15+
qualifier when PCRE_AUTO_CALLOUT was set, pcre_compile() misbehaved. This
16+
bug was found by the LLVM fuzzer.
17+
18+
3. Further to 8.38/46, negated classes such as [^[:^ascii:]\d] were also not
19+
working correctly in UCP mode.
20+
21+
4. The POSIX wrapper function regexec() crashed if the option REG_STARTEND
22+
was set when the pmatch argument was NULL. It now returns REG_INVARG.
23+
24+
5. Allow for up to 32-bit numbers in the ordin() function in pcregrep.
25+
26+
6. An empty \Q\E sequence between an item and its qualifier caused
27+
pcre_compile() to misbehave when auto callouts were enabled. This bug was
28+
found by the LLVM fuzzer.
29+
30+
7. If a pattern that was compiled with PCRE_EXTENDED started with white
31+
space or a #-type comment that was followed by (?-x), which turns off
32+
PCRE_EXTENDED, and there was no subsequent (?x) to turn it on again,
33+
pcre_compile() assumed that (?-x) applied to the whole pattern and
34+
consequently mis-compiled it. This bug was found by the LLVM fuzzer.
35+
36+
8. A call of pcre_copy_named_substring() for a named substring whose number
37+
was greater than the space in the ovector could cause a crash.
38+
39+
9. Yet another buffer overflow bug involved duplicate named groups with a
40+
group that reset capture numbers (compare 8.38/7 below). Once again, I have
41+
just allowed for more memory, even if not needed. (A proper fix is
42+
implemented in PCRE2, but it involves a lot of refactoring.)
43+
44+
10. pcre_get_substring_list() crashed if the use of \K in a match caused the
45+
start of the match to be earlier than the end.
46+
47+
11. Migrating appropriate PCRE2 JIT improvements to PCRE.
48+
49+
12. A pattern such as /(?<=((?C)0))/, which has a callout inside a lookbehind
50+
assertion, caused pcretest to generate incorrect output, and also to read
51+
uninitialized memory (detected by ASAN or valgrind).
52+
53+
13. A pattern that included (*ACCEPT) in the middle of a sufficiently deeply
54+
nested set of parentheses of sufficient size caused an overflow of the
55+
compiling workspace (which was diagnosed, but of course is not desirable).
56+
57+
14. And yet another buffer overflow bug involving duplicate named groups, this
58+
time nested, with a nested back reference. Yet again, I have just allowed
59+
for more memory, because anything more needs all the refactoring that has
60+
been done for PCRE2. An example pattern that provoked this bug is:
61+
/((?J)(?'R'(?'R'(?'R'(?'R'(?'R'(?|(\k'R'))))))))/ and the bug was
62+
registered as CVE-2016-1283.
63+
64+
15. pcretest went into a loop if global matching was requested with an ovector
65+
size less than 2. It now gives an error message. This bug was found by
66+
afl-fuzz.
67+
68+
16. An invalid pattern fragment such as (?(?C)0 was not diagnosing an error
69+
("assertion expected") when (?(?C) was not followed by an opening
70+
parenthesis.
71+
72+
17. Fixed typo ("&&" for "&") in pcre_study(). Fortunately, this could not
73+
actually affect anything, by sheer luck.
74+
75+
18. Applied Chris Wilson's patch (Bugzilla #1681) to CMakeLists.txt for MSVC
76+
static compilation.
77+
78+
19. Modified the RunTest script to incorporate a valgrind suppressions file so
79+
that certain errors, provoked by the SSE2 instruction set when JIT is used,
80+
are ignored.
81+
82+
20. A racing condition is fixed in JIT reported by Mozilla.
83+
84+
21. Minor code refactor to avoid "array subscript is below array bounds"
85+
compiler warning.
86+
87+
22. Minor code refactor to avoid "left shift of negative number" warning.
88+
89+
23. Fix typo causing compile error when 16- or 32-bit JIT is compiled without
90+
UCP support.
91+
92+
24. Refactor to avoid compiler warnings in pcrecpp.cc.
93+
94+
25. Refactor to fix a typo in pcre_jit_test.c
95+
96+
26. Patch to support compiling pcrecpp.cc with Intel compiler.
97+
98+
799
Version 8.38 23-November-2015
8100
-----------------------------
9101

10102
1. If a group that contained a recursive back reference also contained a
11103
forward reference subroutine call followed by a non-forward-reference
12-
subroutine call, for example /.((?2)(?R)\1)()/, pcre2_compile() failed to
104+
subroutine call, for example /.((?2)(?R)\1)()/, pcre_compile() failed to
13105
compile correct code, leading to undefined behaviour or an internally
14106
detected error. This bug was discovered by the LLVM fuzzer.
15107

ext/pcre/pcrelib/LICENCE

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ Email domain: cam.ac.uk
2525
University of Cambridge Computing Service,
2626
Cambridge, England.
2727

28-
Copyright (c) 1997-2015 University of Cambridge
28+
Copyright (c) 1997-2016 University of Cambridge
2929
All rights reserved.
3030

3131

@@ -36,7 +36,7 @@ Written by: Zoltan Herczeg
3636
Email local part: hzmester
3737
Emain domain: freemail.hu
3838

39-
Copyright(c) 2010-2015 Zoltan Herczeg
39+
Copyright(c) 2010-2016 Zoltan Herczeg
4040
All rights reserved.
4141

4242

@@ -47,7 +47,7 @@ Written by: Zoltan Herczeg
4747
Email local part: hzmester
4848
Emain domain: freemail.hu
4949

50-
Copyright(c) 2009-2015 Zoltan Herczeg
50+
Copyright(c) 2009-2016 Zoltan Herczeg
5151
All rights reserved.
5252

5353

ext/pcre/pcrelib/NEWS

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,15 @@
11
News about PCRE releases
22
------------------------
33

4+
Release 8.39 14-June-2016
5+
-------------------------
6+
7+
Some appropriate PCRE2 JIT improvements have been retro-fitted to PCRE1. Apart
8+
from that, this is another bug-fix release. Note that this library (now called
9+
PCRE1) is now being maintained for bug fixes only. New projects are advised to
10+
use the new PCRE2 libraries.
11+
12+
413
Release 8.38 23-November-2015
514
-----------------------------
615

ext/pcre/pcrelib/README

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -442,7 +442,7 @@ The "configure" script also creates config.status, which is an executable
442442
script that can be run to recreate the configuration, and config.log, which
443443
contains compiler output from tests that "configure" runs.
444444

445-
Once "configure" has run, you can run "make". This builds the libraries
445+
Once "configure" has run, you can run "make". This builds the the libraries
446446
libpcre, libpcre16 and/or libpcre32, and a test program called pcretest. If you
447447
enabled JIT support with --enable-jit, a test program called pcre_jit_test is
448448
built as well.

ext/pcre/pcrelib/dftables.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,9 @@ character tables for PCRE. The tables are built according to the current
4343
locale. Now that pcre_maketables is a function visible to the outside world, we
4444
make use of its code from here in order to be consistent. */
4545

46+
#ifdef HAVE_CONFIG_H
4647
#include "config.h"
48+
#endif
4749

4850
#include <ctype.h>
4951
#include <stdio.h>

0 commit comments

Comments
 (0)