From 4705ec278c4c6dbac38bdd416662f01b382b3ddf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= Date: Fri, 14 Oct 2016 09:07:36 +0200 Subject: [PATCH] Fix displaying position in pcretest callout with an escape sequence greater than \x{ff} --- ....39-Fix-pcretest-callout-display-bug.patch | 36 +++++++++++++++++++ pcre.spec | 10 +++++- 2 files changed, 45 insertions(+), 1 deletion(-) create mode 100644 pcre-8.39-Fix-pcretest-callout-display-bug.patch diff --git a/pcre-8.39-Fix-pcretest-callout-display-bug.patch b/pcre-8.39-Fix-pcretest-callout-display-bug.patch new file mode 100644 index 0000000..dd085b8 --- /dev/null +++ b/pcre-8.39-Fix-pcretest-callout-display-bug.patch @@ -0,0 +1,36 @@ +From 74599ddaf3dfb11277401eb6279dd32371f54e18 Mon Sep 17 00:00:00 2001 +From: ph10 +Date: Thu, 6 Oct 2016 16:32:46 +0000 +Subject: [PATCH] Fix pcretest callout display bug +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@1665 2f5784b3-3f2a-0410-8824-cb99058d5e15 + +Petr Písař: Ported to 8.39. + +diff --git a/pcretest.c b/pcretest.c +index 5748c55..5b73a91 100644 +--- a/pcretest.c ++++ b/pcretest.c +@@ -1982,6 +1982,7 @@ return(result); + static int pchar(pcre_uint32 c, FILE *f) + { + int n = 0; ++char tempbuffer[16]; + if (PRINTOK(c)) + { + if (f != NULL) fprintf(f, "%c", c); +@@ -2003,6 +2004,8 @@ if (c < 0x100) + } + + if (f != NULL) n = fprintf(f, "\\x{%02x}", c); ++ else n = sprintf(tempbuffer, "\\x{%02x}", c); ++ + return n >= 0 ? n : 0; + } + +-- +2.7.4 + diff --git a/pcre.spec b/pcre.spec index 2601321..ac4ca20 100644 --- a/pcre.spec +++ b/pcre.spec @@ -2,7 +2,7 @@ #%%global rcversion RC1 Name: pcre Version: 8.39 -Release: %{?rcversion:0.}3%{?rcversion:.%rcversion}%{?dist} +Release: %{?rcversion:0.}4%{?rcversion:.%rcversion}%{?dist} %global myversion %{version}%{?rcversion:-%rcversion} Summary: Perl-compatible regular expression library Group: System Environment/Libraries @@ -45,6 +45,9 @@ Patch3: pcre-8.39-Fix-register-overwite-in-JIT-when-SSE2-acceleration-.patch # without enabled UCP in a positive class, in upstream after 8.39, # upstream bug #1866 Patch4: pcre-8.39-Fix-character-class-bug-when-a-Unicode-property-was-.patch +# Fix displaying position in pcretest callout with an escape sequence greater +# than \x{ff}, in upstream after 8.39 +Patch5: pcre-8.39-Fix-pcretest-callout-display-bug.patch BuildRequires: readline-devel BuildRequires: autoconf BuildRequires: automake @@ -137,6 +140,7 @@ Utilities demonstrating PCRE capabilities like pcregrep or pcretest. %patch2 -p1 %patch3 -p1 %patch4 -p1 +%patch5 -p1 # Because of rpath patch libtoolize --copy --force autoreconf -vif @@ -233,6 +237,10 @@ make %{?_smp_mflags} check VERBOSE=yes %{_mandir}/man1/pcretest.* %changelog +* Fri Oct 14 2016 Petr Pisar - 8.39-4 +- Fix displaying position in pcretest callout with an escape sequence greater + than \x{ff} + * Tue Aug 30 2016 Petr Pisar - 8.39-3 - Fix register overwite in JIT when SSE2 acceleration is enabled - Fix matching characters above 255 when a negative character type was used