--- pcre2-10.21.orig/pcre2-config.in +++ pcre2-10.21/pcre2-config.in @@ -28,19 +28,8 @@ fi libR= -case `uname -s` in - *SunOS*) - libR=" -R@libdir@" - ;; - *BSD*) - libR=" -Wl,-R@libdir@" - ;; -esac libS= -if test @libdir@ != /usr/lib ; then - libS=-L@libdir@ -fi while test $# -gt 0; do case "$1" in --- pcre2-10.21.orig/src/pcre2_compile.c +++ pcre2-10.21/src/pcre2_compile.c @@ -5899,10 +5899,22 @@ goto FAILED; } 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) { - *code++ = OP_CLOSE; - PUT2INC(code, 0, oc->number); + if (lengthptr != NULL) + { + *lengthptr += CU2BYTES(1) + IMM2_SIZE; + } + else + { + *code++ = OP_CLOSE; + PUT2INC(code, 0, oc->number); + } } setverb = *code++ = (cb->assert_depth > 0)? OP_ASSERT_ACCEPT : OP_ACCEPT; --- pcre2-10.21.orig/testdata/testoutput8-8-4 +++ pcre2-10.21/testdata/testoutput8-8-4 @@ -1022,4 +1022,7 @@ May match empty string Subject length lower bound = 0 +/([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00](*ACCEPT)/ +Failed: error 114 at offset 509: missing closing parenthesis + # End of testinput8 --- pcre2-10.21.orig/testdata/testoutput8-16-3 +++ pcre2-10.21/testdata/testoutput8-16-3 @@ -1023,4 +1023,7 @@ May match empty string Subject length lower bound = 0 +/([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00](*ACCEPT)/ +Failed: error 114 at offset 509: missing closing parenthesis + # End of testinput8 --- pcre2-10.21.orig/testdata/testoutput8-8-3 +++ pcre2-10.21/testdata/testoutput8-8-3 @@ -1024,4 +1024,7 @@ May match empty string Subject length lower bound = 0 +/([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00](*ACCEPT)/ +Failed: error 114 at offset 509: missing closing parenthesis + # End of testinput8 --- pcre2-10.21.orig/testdata/testoutput8-8-2 +++ pcre2-10.21/testdata/testoutput8-8-2 @@ -1026,4 +1026,7 @@ May match empty string Subject length lower bound = 0 +/([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00](*ACCEPT)/ +Failed: error 114 at offset 509: missing closing parenthesis + # End of testinput8 --- pcre2-10.21.orig/testdata/testoutput8-32-4 +++ pcre2-10.21/testdata/testoutput8-32-4 @@ -1023,4 +1023,7 @@ May match empty string Subject length lower bound = 0 +/([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00](*ACCEPT)/ +Failed: error 114 at offset 509: missing closing parenthesis + # End of testinput8 --- pcre2-10.21.orig/testdata/testinput8 +++ pcre2-10.21/testdata/testinput8 @@ -182,4 +182,6 @@ /((?1)(?2)(?3)(?4)(?5)(?6)(?7)(?8)(?9)(?9)(?8)(?7)(?6)(?5)(?4)(?3)(?2)(?1)(?0)){2,}()()()()()()()()()/debug +/([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00](*ACCEPT)/ + # End of testinput8 --- pcre2-10.21.orig/testdata/testoutput8-32-2 +++ pcre2-10.21/testdata/testoutput8-32-2 @@ -1023,4 +1023,7 @@ May match empty string Subject length lower bound = 0 +/([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00](*ACCEPT)/ +Failed: error 114 at offset 509: missing closing parenthesis + # End of testinput8 --- pcre2-10.21.orig/testdata/testoutput8-16-2 +++ pcre2-10.21/testdata/testoutput8-16-2 @@ -1027,4 +1027,7 @@ May match empty string Subject length lower bound = 0 +/([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00](*ACCEPT)/ +Failed: error 186 at offset 490: regular expression is too complicated + # End of testinput8 --- pcre2-10.21.orig/testdata/testoutput8-32-3 +++ pcre2-10.21/testdata/testoutput8-32-3 @@ -1023,4 +1023,7 @@ May match empty string Subject length lower bound = 0 +/([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00](*ACCEPT)/ +Failed: error 114 at offset 509: missing closing parenthesis + # End of testinput8 --- pcre2-10.21.orig/debian/changelog +++ pcre2-10.21/debian/changelog @@ -0,0 +1,27 @@ +pcre2 (10.21-1) unstable; urgency=low + + * New upstream version + * Upstream patch to fix workspace overflow for (*ACCEPT) with deeply + nested parentheses (Closes: #815920) + + -- Matthew Vernon Sat, 27 Feb 2016 15:21:34 +0000 + +pcre2 (10.20-3) unstable; urgency=low + + * Enable JIT on ppc64 & ppc64el (Closes: #806388) + + -- Matthew Vernon Fri, 27 Nov 2015 08:16:38 +0000 + +pcre2 (10.20-2) unstable; urgency=low + + * remove unnecessary -L settings (Closes: #805941) + * Improve makefile syntax, and add JIT on arm64 + + -- Matthew Vernon Tue, 24 Nov 2015 20:39:15 +0000 + +pcre2 (10.20-1) unstable; urgency=low + + * Initial debian version (Closes: #805728) + + -- Matthew Vernon Sun, 22 Nov 2015 15:58:38 +0000 + --- pcre2-10.21.orig/debian/watch +++ pcre2-10.21/debian/watch @@ -0,0 +1,2 @@ +version=3 +ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre2-([\d\.]+)\.zip --- pcre2-10.21.orig/debian/libpcre2-16-0.install +++ pcre2-10.21/debian/libpcre2-16-0.install @@ -0,0 +1 @@ +debian/tmp/usr/lib/*/libpcre2-16.so.* --- pcre2-10.21.orig/debian/copyright +++ pcre2-10.21/debian/copyright @@ -0,0 +1,87 @@ +This package was debianized by Matthew Vernon , +with sources downloaded from: +ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/ + +PCRE2 LICENCE +------------- + +PCRE2 is a library of functions to support regular expressions whose syntax +and semantics are as close as possible to those of the Perl 5 language. + +Release 10 of PCRE2 is distributed under the terms of the "BSD" licence, as +specified below. The documentation for PCRE2, supplied in the "doc" +directory, is distributed under the same terms as the software itself. The data +in the testdata directory is not copyrighted and is in the public domain. + +The basic library functions are written in C and are freestanding. Also +included in the distribution is a just-in-time compiler that can be used to +optimize pattern matching. This is an optional feature that can be omitted when +the library is built. + + +THE BASIC LIBRARY FUNCTIONS +--------------------------- + +Written by: Philip Hazel +Email local part: ph10 +Email domain: cam.ac.uk + +University of Cambridge Computing Service, +Cambridge, England. + +Copyright (c) 1997-2015 University of Cambridge +All rights reserved. + + +PCRE2 JUST-IN-TIME COMPILATION SUPPORT +-------------------------------------- + +Written by: Zoltan Herczeg +Email local part: hzmester +Emain domain: freemail.hu + +Copyright(c) 2010-2015 Zoltan Herczeg +All rights reserved. + + +STACK-LESS JUST-IN-TIME COMPILER +-------------------------------- + +Written by: Zoltan Herczeg +Email local part: hzmester +Emain domain: freemail.hu + +Copyright(c) 2009-2015 Zoltan Herczeg +All rights reserved. + + +THE "BSD" LICENCE +----------------- + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + * Neither the name of the University of Cambridge nor the names of any + contributors may be used to endorse or promote products derived from this + software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE +LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE. + +End --- pcre2-10.21.orig/debian/libpcre2-8-0.install +++ pcre2-10.21/debian/libpcre2-8-0.install @@ -0,0 +1 @@ +debian/tmp/usr/lib/*/libpcre2-8.so.* --- pcre2-10.21.orig/debian/rules +++ pcre2-10.21/debian/rules @@ -0,0 +1,29 @@ +#!/usr/bin/make -f +# See debhelper(7) +# output every command that modifies files on the build system. +#DH_VERBOSE = 1 + +# see dpkg-buildflags(1) +DPKG_EXPORT_BUILDFLAGS = 1 +include /usr/share/dpkg/default.mk +# prefix names of functions in libpcreposix with PCRE2 to avoid clash with +# ones in libc. +export DEB_CFLAGS_MAINT_APPEND = -Dregcomp=PCRE2regcomp -Dregexec=PCRE2regexec -Dregerror=PCRE2regerror -Dregfree=PCRE2regfree + + +deb_maint_conf_args = --enable-pcre2-16 --enable-pcre2-32 +#enable JIT only on architectures that support it (see pcre2jit.3) +ifneq ($(filter i386 amd64 armel armhf mips mipsel mips64el powerpc sparc arm64 ppc64 ppc64el, $(DEB_HOST_ARCH)),) +deb_maint_conf_args +=--enable-jit +else +deb_maint_conf_args +=--disable-jit +endif + +%: + dh $@ + +override_dh_auto_configure: + dh_auto_configure -- $(deb_maint_conf_args) + +override_dh_strip: + dh_strip --dbg-package=libpcre2-dbg --- pcre2-10.21.orig/debian/libpcre2-dev.install +++ pcre2-10.21/debian/libpcre2-dev.install @@ -0,0 +1,6 @@ +debian/tmp/usr/include/* +debian/tmp/usr/lib/*/lib*.a +debian/tmp/usr/lib/*/lib*.so +debian/tmp/usr/lib/*/pkgconfig/* +debian/tmp/usr/bin/*-config +debian/tmp/usr/share/man/man3/* --- pcre2-10.21.orig/debian/control +++ pcre2-10.21/debian/control @@ -0,0 +1,114 @@ +Source: pcre2 +Section: libs +Priority: optional +Maintainer: Matthew Vernon +Standards-Version: 3.9.6 +Build-Depends: debhelper (>=9), dpkg-dev (>= 1.16.1~) + +Package: libpcre2-8-0 +Section: libs +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends} +Multi-Arch: same +Pre-Depends: ${misc:Pre-Depends} +Description: New Perl Compatible Regular Expression Library- 8 bit runtime files + This is PCRE2, the new implementation of PCRE, a library of functions + to support regular expressions whose syntax and semantics are as + close as possible to those of the Perl 5 language. New projects + should use this library in preference to the older library, + confusingly called pcre3 in Debian. + . + This package contains the 8 bit runtime library. + +Package: libpcre2-16-0 +Section: libs +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends} +Multi-Arch: same +Pre-Depends: ${misc:Pre-Depends} +Description: New Perl Compatible Regular Expression Library - 16 bit runtime files + This is PCRE2, the new implementation of PCRE, a library of functions + to support regular expressions whose syntax and semantics are as + close as possible to those of the Perl 5 language. New projects + should use this library in preference to the older library, + confusingly called pcre3 in Debian. + . + This package contains the 16 bit runtime library. + +Package: libpcre2-32-0 +Section: libs +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends} +Multi-Arch: same +Pre-Depends: ${misc:Pre-Depends} +Description: New Perl Compatible Regular Expression Library - 32 bit runtime files + This is PCRE2, the new implementation of PCRE, a library of functions + to support regular expressions whose syntax and semantics are as + close as possible to those of the Perl 5 language. New projects + should use this library in preference to the older library, + confusingly called pcre3 in Debian. + . + This package contains the 32 bit runtime library. + +Package: libpcre2-posix0 +Section: libs +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends} +Multi-Arch: same +Pre-Depends: ${misc:Pre-Depends} +Description: New Perl Compatible Regular Expression Library - posix-compatible runtime files + This is PCRE2, the new implementation of PCRE, a library of functions + to support regular expressions whose syntax and semantics are as + close as possible to those of the Perl 5 language. New projects + should use this library in preference to the older library, + confusingly called pcre3 in Debian. + . + This package contains the runtime library for the posix-compatible API. + +Package: libpcre2-dev +Section: libdevel +Architecture: any +Multi-Arch: same +Conflicts: libpcre3-dev (<<2:8.35-8) +Depends: libc6-dev, libpcre2-8-0 (= ${binary:Version}), libpcre2-16-0 (= ${binary:Version}), libpcre2-32-0 (= ${binary:Version}), libpcre2-posix0 (= ${binary:Version}), ${misc:Depends} +Description: New Perl Compatible Regular Expression Library - development files + This is PCRE2, the new implementation of PCRE, a library of functions + to support regular expressions whose syntax and semantics are as + close as possible to those of the Perl 5 language. New projects + should use this library in preference to the older library, + confusingly called pcre3 in Debian. + . + This package contains the development files, including headers, + static libraries, and documentation. + +Package: libpcre2-dbg +Section: debug +Priority: extra +Architecture: any +Multi-Arch: same +Depends: libpcre2-8-0 (= ${binary:Version}), libpcre2-16-0 (= ${binary:Version}), libpcre2-32-0 (= ${binary:Version}), libpcre2-posix0 (= ${binary:Version}), ${misc:Depends} +Description: New Perl Compatible Regular Expression Library - debug symbols + This is PCRE2, the new implementation of PCRE, a library of functions + to support regular expressions whose syntax and semantics are as + close as possible to those of the Perl 5 language. New projects + should use this library in preference to the older library, + confusingly called pcre3 in Debian. + . + This package contains the debug symbols. + + +Package: pcre2-utils +Section: utils +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: New Perl Compatible Regular Expression Library - utilities + This is PCRE2, the new implementation of PCRE, a library of functions + to support regular expressions whose syntax and semantics are as + close as possible to those of the Perl 5 language. New projects + should use this library in preference to the older library, + confusingly called pcre3 in Debian. + . + This package contains the utilities pcre2grep (like grep with PCRE) + and pcre2test (a test program for the library, but also useful for + experimenting with regular expressions). Both programs are also + useful examples of programming with libpcre2. --- pcre2-10.21.orig/debian/compat +++ pcre2-10.21/debian/compat @@ -0,0 +1 @@ +9 --- pcre2-10.21.orig/debian/pcre2-utils.install +++ pcre2-10.21/debian/pcre2-utils.install @@ -0,0 +1,4 @@ +debian/tmp/usr/bin/pcre2test +debian/tmp/usr/bin/pcre2grep +debian/tmp/usr/share/man/man1/pcre2test.1 +debian/tmp/usr/share/man/man1/pcre2grep.1 --- pcre2-10.21.orig/debian/libpcre2-posix0.install +++ pcre2-10.21/debian/libpcre2-posix0.install @@ -0,0 +1 @@ +debian/tmp/usr/lib/*/libpcre2-posix.so.* --- pcre2-10.21.orig/debian/README.Debian +++ pcre2-10.21/debian/README.Debian @@ -0,0 +1,12 @@ + PCRE2 for Debian + ---------------- + +This is PCRE2, the newer version of the PCRE (perl-compatible regular +expression) library. New projects should use this library in +preference the older PCRE library (which is, for historical reasons, +called pcre3 in Debian). + +The names of functions in libpcre2-posix are prefixed with PCRE2_, so +they don't clash with the names in libc. + + -- Matthew Vernon , Sun, 22 Nov 2015 16:07:27 +0000 --- pcre2-10.21.orig/debian/libpcre2-dev.manpages +++ pcre2-10.21/debian/libpcre2-dev.manpages @@ -0,0 +1 @@ +debian/tmp/usr/share/man/man1/pcre2-config.1 --- pcre2-10.21.orig/debian/libpcre2-32-0.install +++ pcre2-10.21/debian/libpcre2-32-0.install @@ -0,0 +1 @@ +debian/tmp/usr/lib/*/libpcre2-32.so.*