From 3f025cce7c454d60f26151e3f1a4f0efe48ff578 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= Date: Fri, 23 Feb 2018 09:35:02 +0100 Subject: [PATCH] 8.42-RC1 bump --- .gitignore | 1 + ...-linenumbers-and-counts-to-long-ints.patch | 109 ------------------ ...g-when-REG_STARTEND-is-used-with-a-n.patch | 41 ------- ...s-read-for-partial-matching-of-.-aga.patch | 39 ------- ...x-pcregrep-recursive-file-name-issue.patch | 43 ------- ...ory-leak-introduced-in-previous-bug-.patch | 33 ------ ...character-when-a-backreference-with-.patch | 74 ------------ pcre.spec | 37 ++---- sources | 2 +- 9 files changed, 10 insertions(+), 369 deletions(-) delete mode 100644 pcre-8.41-Change-pcregrep-linenumbers-and-counts-to-long-ints.patch delete mode 100644 pcre-8.41-Fix-POSIX-API-bug-when-REG_STARTEND-is-used-with-a-n.patch delete mode 100644 pcre-8.41-Fix-out-of-bounds-read-for-partial-matching-of-.-aga.patch delete mode 100644 pcre-8.41-Fix-pcregrep-recursive-file-name-issue.patch delete mode 100644 pcre-8.41-Fix-possible-memory-leak-introduced-in-previous-bug-.patch delete mode 100644 pcre-8.41-Fix-wrong-first-character-when-a-backreference-with-.patch diff --git a/.gitignore b/.gitignore index 28e7d55..06c2747 100644 --- a/.gitignore +++ b/.gitignore @@ -30,3 +30,4 @@ pcre-8.10.tar.bz2 /pcre-8.40.tar.bz2 /pcre-8.41-RC1.tar.bz2 /pcre-8.41.tar.bz2 +/pcre-8.42-RC1.tar.bz2 diff --git a/pcre-8.41-Change-pcregrep-linenumbers-and-counts-to-long-ints.patch b/pcre-8.41-Change-pcregrep-linenumbers-and-counts-to-long-ints.patch deleted file mode 100644 index 7950bc9..0000000 --- a/pcre-8.41-Change-pcregrep-linenumbers-and-counts-to-long-ints.patch +++ /dev/null @@ -1,109 +0,0 @@ -From faeb061701c6875684eccc463b1a325e6c9a31af Mon Sep 17 00:00:00 2001 -From: ph10 -Date: Fri, 8 Dec 2017 14:09:22 +0000 -Subject: [PATCH] Change pcregrep linenumbers and counts to long ints. -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -git-svn-id: svn://vcs.exim.org/pcre/code/trunk@1718 2f5784b3-3f2a-0410-8824-cb99058d5e15 -Petr Písař: Ported to 8.41. ---- - pcregrep.c | 24 ++++++++++++------------ - -diff --git a/pcregrep.c b/pcregrep.c -index a81c88d..628fac4 100644 ---- a/pcregrep.c -+++ b/pcregrep.c -@@ -1387,8 +1387,8 @@ Returns: nothing - */ - - static void --do_after_lines(int lastmatchnumber, char *lastmatchrestart, char *endptr, -- char *printname) -+do_after_lines(unsigned long int lastmatchnumber, char *lastmatchrestart, -+ char *endptr, char *printname) - { - if (after_context > 0 && lastmatchnumber > 0) - { -@@ -1398,7 +1398,7 @@ if (after_context > 0 && lastmatchnumber > 0) - int ellength; - char *pp = lastmatchrestart; - if (printname != NULL) fprintf(stdout, "%s-", printname); -- if (number) fprintf(stdout, "%d-", lastmatchnumber++); -+ if (number) fprintf(stdout, "%lu-", lastmatchnumber++); - pp = end_of_line(pp, endptr, &ellength); - FWRITE(lastmatchrestart, 1, pp - lastmatchrestart, stdout); - lastmatchrestart = pp; -@@ -1502,11 +1502,11 @@ static int - pcregrep(void *handle, int frtype, char *filename, char *printname) - { - int rc = 1; --int linenumber = 1; --int lastmatchnumber = 0; --int count = 0; - int filepos = 0; - int offsets[OFFSET_SIZE]; -+unsigned long int linenumber = 1; -+unsigned long int lastmatchnumber = 0; -+unsigned long int count = 0; - char *lastmatchrestart = NULL; - char *ptr = main_buffer; - char *endptr; -@@ -1609,7 +1609,7 @@ while (ptr < endptr) - - if (endlinelength == 0 && t == main_buffer + bufsize) - { -- fprintf(stderr, "pcregrep: line %d%s%s is too long for the internal buffer\n" -+ fprintf(stderr, "pcregrep: line %lu%s%s is too long for the internal buffer\n" - "pcregrep: check the --buffer-size option\n", - linenumber, - (filename == NULL)? "" : " of file ", -@@ -1747,7 +1747,7 @@ while (ptr < endptr) - prevoffsets[1] = offsets[1]; - - if (printname != NULL) fprintf(stdout, "%s:", printname); -- if (number) fprintf(stdout, "%d:", linenumber); -+ if (number) fprintf(stdout, "%lu:", linenumber); - - /* Handle --line-offsets */ - -@@ -1862,7 +1862,7 @@ while (ptr < endptr) - { - char *pp = lastmatchrestart; - if (printname != NULL) fprintf(stdout, "%s-", printname); -- if (number) fprintf(stdout, "%d-", lastmatchnumber++); -+ if (number) fprintf(stdout, "%lu-", lastmatchnumber++); - pp = end_of_line(pp, endptr, &ellength); - FWRITE(lastmatchrestart, 1, pp - lastmatchrestart, stdout); - lastmatchrestart = pp; -@@ -1902,7 +1902,7 @@ while (ptr < endptr) - int ellength; - char *pp = p; - if (printname != NULL) fprintf(stdout, "%s-", printname); -- if (number) fprintf(stdout, "%d-", linenumber - linecount--); -+ if (number) fprintf(stdout, "%lu-", linenumber - linecount--); - pp = end_of_line(pp, endptr, &ellength); - FWRITE(p, 1, pp - p, stdout); - p = pp; -@@ -1916,7 +1916,7 @@ while (ptr < endptr) - endhyphenpending = TRUE; - - if (printname != NULL) fprintf(stdout, "%s:", printname); -- if (number) fprintf(stdout, "%d:", linenumber); -+ if (number) fprintf(stdout, "%lu:", linenumber); - - /* In multiline mode, we want to print to the end of the line in which - the end of the matched string is found, so we adjust linelength and the -@@ -2112,7 +2112,7 @@ if (count_only && !quiet) - { - if (printname != NULL && filenames != FN_NONE) - fprintf(stdout, "%s:", printname); -- fprintf(stdout, "%d\n", count); -+ fprintf(stdout, "%lu\n", count); - } - } - --- -2.13.6 - diff --git a/pcre-8.41-Fix-POSIX-API-bug-when-REG_STARTEND-is-used-with-a-n.patch b/pcre-8.41-Fix-POSIX-API-bug-when-REG_STARTEND-is-used-with-a-n.patch deleted file mode 100644 index 6813006..0000000 --- a/pcre-8.41-Fix-POSIX-API-bug-when-REG_STARTEND-is-used-with-a-n.patch +++ /dev/null @@ -1,41 +0,0 @@ -From 8dc7206187ef9e9486fb5f102b85400ae9795dd1 Mon Sep 17 00:00:00 2001 -From: ph10 -Date: Mon, 19 Feb 2018 16:35:05 +0000 -Subject: [PATCH] Fix POSIX API bug when REG_STARTEND is used with a non-zero - starting offset and there are unset groups within the matching group list. -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -git-svn-id: svn://vcs.exim.org/pcre/code/trunk@1724 2f5784b3-3f2a-0410-8824-cb99058d5e15 -Petr Písař: Ported to 8.41. ---- - pcreposix.c | 6 +++--- - -diff --git a/pcreposix.c b/pcreposix.c -index 7b404a7..a76d6bf 100644 ---- a/pcreposix.c -+++ b/pcreposix.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-2017 University of Cambridge -+ Copyright (c) 1997-2018 University of Cambridge - - ----------------------------------------------------------------------------- - Redistribution and use in source and binary forms, with or without -@@ -389,8 +389,8 @@ if (rc >= 0) - { - for (i = 0; i < (size_t)rc; i++) - { -- pmatch[i].rm_so = ovector[i*2] + so; -- pmatch[i].rm_eo = ovector[i*2+1] + so; -+ pmatch[i].rm_so = (ovector[i*2] < 0)? -1 : ovector[i*2] + so; -+ pmatch[i].rm_eo = (ovector[i*2+1] < 0)? -1: ovector[i*2+1] + so; - } - if (allocated_ovector) free(ovector); - for (; i < nmatch; i++) pmatch[i].rm_so = pmatch[i].rm_eo = -1; --- -2.13.6 - diff --git a/pcre-8.41-Fix-out-of-bounds-read-for-partial-matching-of-.-aga.patch b/pcre-8.41-Fix-out-of-bounds-read-for-partial-matching-of-.-aga.patch deleted file mode 100644 index 35ec0a0..0000000 --- a/pcre-8.41-Fix-out-of-bounds-read-for-partial-matching-of-.-aga.patch +++ /dev/null @@ -1,39 +0,0 @@ -From 4ffc344ddf6246bf8d19c94c58af0853ae6768a7 Mon Sep 17 00:00:00 2001 -From: ph10 -Date: Mon, 29 Jan 2018 14:45:51 +0000 -Subject: [PATCH] Fix out-of-bounds read for partial matching of /./ against an - empty string when the newline type is CRLF. -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -git-svn-id: svn://vcs.exim.org/pcre/code/trunk@1723 2f5784b3-3f2a-0410-8824-cb99058d5e15 -Signed-off-by: Petr Písař ---- - pcre_exec.c | 4 ++-- - -diff --git a/pcre_exec.c b/pcre_exec.c -index 1a9bdd5..1993cb3 100644 ---- a/pcre_exec.c -+++ b/pcre_exec.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-2014 University of Cambridge -+ Copyright (c) 1997-2018 University of Cambridge - - ----------------------------------------------------------------------------- - Redistribution and use in source and binary forms, with or without -@@ -2305,7 +2305,7 @@ for (;;) - case OP_ANY: - if (IS_NEWLINE(eptr)) RRETURN(MATCH_NOMATCH); - if (md->partial != 0 && -- eptr + 1 >= md->end_subject && -+ eptr == md->end_subject - 1 && - NLBLOCK->nltype == NLTYPE_FIXED && - NLBLOCK->nllen == 2 && - UCHAR21TEST(eptr) == NLBLOCK->nl[0]) --- -2.13.6 - diff --git a/pcre-8.41-Fix-pcregrep-recursive-file-name-issue.patch b/pcre-8.41-Fix-pcregrep-recursive-file-name-issue.patch deleted file mode 100644 index 4be5f36..0000000 --- a/pcre-8.41-Fix-pcregrep-recursive-file-name-issue.patch +++ /dev/null @@ -1,43 +0,0 @@ -From 49b9fc5a42ea59ca095413bdd4d11a952df5562d Mon Sep 17 00:00:00 2001 -From: ph10 -Date: Fri, 20 Oct 2017 16:57:48 +0000 -Subject: [PATCH 1/2] Fix pcregrep recursive file name issue. -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -git-svn-id: svn://vcs.exim.org/pcre/code/trunk@1712 2f5784b3-3f2a-0410-8824-cb99058d5e15 - -Petr Písař: Ported to 8.41. - -diff --git a/pcregrep.c b/pcregrep.c -index 317f745..d4a5fb5 100644 ---- a/pcregrep.c -+++ b/pcregrep.c -@@ -2234,7 +2234,7 @@ if (isdirectory(pathname)) - - if (dee_action == dee_RECURSE) - { -- char buffer[1024]; -+ char buffer[2048]; - char *nextfile; - directory_type *dir = opendirectory(pathname); - -@@ -2249,7 +2249,13 @@ if (isdirectory(pathname)) - while ((nextfile = readdirectory(dir)) != NULL) - { - int frc; -- sprintf(buffer, "%.512s%c%.128s", pathname, FILESEP, nextfile); -+ int fnlength = strlen(pathname) + strlen(nextfile) + 2; -+ if (fnlength > 2048) -+ { -+ fprintf(stderr, "pcre2grep: recursive filename is too long\n"); -+ return 2; -+ } -+ sprintf(buffer, "%s%c%s", pathname, FILESEP, nextfile); - frc = grep_or_recurse(buffer, dir_recurse, FALSE); - if (frc > 1) rc = frc; - else if (frc == 0 && rc == 1) rc = 0; --- -2.13.6 - diff --git a/pcre-8.41-Fix-possible-memory-leak-introduced-in-previous-bug-.patch b/pcre-8.41-Fix-possible-memory-leak-introduced-in-previous-bug-.patch deleted file mode 100644 index 8d91b14..0000000 --- a/pcre-8.41-Fix-possible-memory-leak-introduced-in-previous-bug-.patch +++ /dev/null @@ -1,33 +0,0 @@ -From bfd4f2b52faba20be338e06ac23cb1061ec4c777 Mon Sep 17 00:00:00 2001 -From: ph10 -Date: Sun, 22 Oct 2017 16:19:42 +0000 -Subject: [PATCH 2/2] Fix possible memory leak introduced in previous bug fix. -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -git-svn-id: svn://vcs.exim.org/pcre/code/trunk@1713 2f5784b3-3f2a-0410-8824-cb99058d5e15 -Signed-off-by: Petr Písař ---- - pcregrep.c | 5 +++-- - 1 file changed, 3 insertions(+), 2 deletions(-) - -diff --git a/pcregrep.c b/pcregrep.c -index d4a5fb5..a81c88d 100644 ---- a/pcregrep.c -+++ b/pcregrep.c -@@ -2253,8 +2253,9 @@ if (isdirectory(pathname)) - if (fnlength > 2048) - { - fprintf(stderr, "pcre2grep: recursive filename is too long\n"); -- return 2; -- } -+ rc = 2; -+ break; -+ } - sprintf(buffer, "%s%c%s", pathname, FILESEP, nextfile); - frc = grep_or_recurse(buffer, dir_recurse, FALSE); - if (frc > 1) rc = frc; --- -2.13.6 - diff --git a/pcre-8.41-Fix-wrong-first-character-when-a-backreference-with-.patch b/pcre-8.41-Fix-wrong-first-character-when-a-backreference-with-.patch deleted file mode 100644 index 0e4e301..0000000 --- a/pcre-8.41-Fix-wrong-first-character-when-a-backreference-with-.patch +++ /dev/null @@ -1,74 +0,0 @@ -From 774be03b760cb4b56abf686f6dc56ac4de07fa67 Mon Sep 17 00:00:00 2001 -From: ph10 -Date: Tue, 12 Dec 2017 15:07:18 +0000 -Subject: [PATCH] Fix wrong first character when a backreference with a zero - repeat is first (apart from assersions) in a pattern. -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -git-svn-id: svn://vcs.exim.org/pcre/code/trunk@1719 2f5784b3-3f2a-0410-8824-cb99058d5e15 -Petr Písař: Ported to 8.41. ---- - pcre_compile.c | 2 +- - testdata/testinput2 | 8 ++++++++ - testdata/testoutput2 | 16 ++++++++++++++++ - -diff --git a/pcre_compile.c b/pcre_compile.c -index 42f204c..6dd8886 100644 ---- a/pcre_compile.c -+++ b/pcre_compile.c -@@ -8060,7 +8060,7 @@ for (;; ptr++) - single group (i.e. not to a duplicated name. */ - - HANDLE_REFERENCE: -- if (firstcharflags == REQ_UNSET) firstcharflags = REQ_NONE; -+ if (firstcharflags == REQ_UNSET) zerofirstcharflags = firstcharflags = REQ_NONE; - previous = code; - item_hwm_offset = cd->hwm - cd->start_workspace; - *code++ = ((options & PCRE_CASELESS) != 0)? OP_REFI : OP_REF; -diff --git a/testdata/testinput2 b/testdata/testinput2 -index 08c6f39..8ba4dc4 100644 ---- a/testdata/testinput2 -+++ b/testdata/testinput2 -@@ -4249,4 +4249,12 @@ backtracking verbs. --/ - - /(?=.*[A-Z])/I - -+"(?<=(a))\1?b" -+ ab -+ aaab -+ -+"(?=(a))\1?b" -+ ab -+ aaab -+ - /-- End of testinput2 --/ -diff --git a/testdata/testoutput2 b/testdata/testoutput2 -index 811bbef..61ed8d9 100644 ---- a/testdata/testoutput2 -+++ b/testdata/testoutput2 -@@ -14705,4 +14705,20 @@ No options - No first char - No need char - -+"(?<=(a))\1?b" -+ ab -+ 0: b -+ 1: a -+ aaab -+ 0: ab -+ 1: a -+ -+"(?=(a))\1?b" -+ ab -+ 0: ab -+ 1: a -+ aaab -+ 0: ab -+ 1: a -+ - /-- End of testinput2 --/ --- -2.13.6 - diff --git a/pcre.spec b/pcre.spec index 579504a..2e976fa 100644 --- a/pcre.spec +++ b/pcre.spec @@ -1,14 +1,14 @@ # Is this a stable/testing release: -#%%global rcversion RC1 +%global rcversion RC1 Name: pcre -Version: 8.41 -Release: %{?rcversion:0.}6%{?rcversion:.%rcversion}%{?dist} +Version: 8.42 +Release: %{?rcversion:0.}1%{?rcversion:.%rcversion}%{?dist} %global myversion %{version}%{?rcversion:-%rcversion} Summary: Perl-compatible regular expression library ## Source package only: -# INSTALL: ??? +# INSTALL: FSFAP # install-sh: MIT and Public Domain -# ltmain.sh: (GPLv2+ or BSD) and GPLv3+ +# ltmain.sh: (GPLv2+ or BSD) and (GPLv3+ or MIT) # missing: GPLv2+ or BSD # compile: GPLv2+ or BSD # config.sub: GPLv3+ or BSD @@ -35,24 +35,6 @@ Patch0: pcre-8.21-multilib.patch Patch1: pcre-8.32-refused_spelling_terminated.patch # Fix recursion stack estimator, upstream bug #2173, refused by upstream Patch2: pcre-8.41-fix_stack_estimator.patch -# 1/2 Accept files names longer than 128 bytes in recursive mode of pcregrep, -# upstream bug #2177, in upstream after 8.41 -Patch3: pcre-8.41-Fix-pcregrep-recursive-file-name-issue.patch -# 2/2 Accept files names longer than 128 bytes in recursive mode of pcregrep, -# upstream bug #2177, in upstream after 8.41 -Patch4: pcre-8.41-Fix-possible-memory-leak-introduced-in-previous-bug-.patch -# Allow pcregrep match counter to handle values larger than 2147483647, -# upstream bug #2208, in upstream after 8.41 -Patch5: pcre-8.41-Change-pcregrep-linenumbers-and-counts-to-long-ints.patch -# Fix incorrect first matching character when a backreference with zero minimum -# repeat starts a pattern, upstream bug #2209, in upstream after 8.41 -Patch6: pcre-8.41-Fix-wrong-first-character-when-a-backreference-with-.patch -# Fix out-of-bounds read for partial matching of /./ against an empty string -# when the newline type is CRLF, upstream bug #2226, in upstream after 8.41 -Patch7: pcre-8.41-Fix-out-of-bounds-read-for-partial-matching-of-.-aga.patch -# Fix returning unset groups in POSIX interface if REG_STARTEND has a non-zero -# starting offset, upstream bug #2244, in upstream after 8.41 -Patch8: pcre-8.41-Fix-POSIX-API-bug-when-REG_STARTEND-is-used-with-a-n.patch BuildRequires: readline-devel BuildRequires: autoconf BuildRequires: automake @@ -137,12 +119,6 @@ Utilities demonstrating PCRE capabilities like pcregrep or pcretest. %patch0 -p1 %patch1 -p1 %patch2 -p2 -%patch3 -p1 -%patch4 -p1 -%patch5 -p1 -%patch6 -p1 -%patch7 -p1 -%patch8 -p1 # Because of rpath patch libtoolize --copy --force autoreconf -vif @@ -237,6 +213,9 @@ make %{?_smp_mflags} check VERBOSE=yes %{_mandir}/man1/pcretest.* %changelog +* Fri Feb 23 2018 Petr Pisar - 8.42-0.1.RC1 +- 8.42-RC1 bump + * Tue Feb 20 2018 Petr Pisar - 8.41-6 - Fix returning unset groups in POSIX interface if REG_STARTEND has a non-zero starting offset (upstream bug #2244) diff --git a/sources b/sources index 11cfcaf..388e550 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (pcre-8.41.tar.bz2) = cc9cdbeb98c010fe4f093a019bebfb91965dae4c6a48f8e49c38ec8df7d9da7f0d32c12fc58f22c51f1c2f010e72b65bcbf8bbf180060e93edf464fa9a7c3551 +SHA512 (pcre-8.42-RC1.tar.bz2) = 9569246c992f70be8563c90103402feb04645bb821b96634e2af98001f6614201907f052cfb50c73f99976214f373acc331d97a265a437def06b669a21acb8b6