diff --git a/pcre-8.38-Allow-for-up-to-32-bit-numbers-in-the-ordin-function.patch b/pcre-8.38-Allow-for-up-to-32-bit-numbers-in-the-ordin-function.patch new file mode 100644 index 0000000..6926f76 --- /dev/null +++ b/pcre-8.38-Allow-for-up-to-32-bit-numbers-in-the-ordin-function.patch @@ -0,0 +1,29 @@ +From e347b40d5bb12f7ef1e632aa649571a107be7d8a Mon Sep 17 00:00:00 2001 +From: ph10 +Date: Sun, 29 Nov 2015 17:46:23 +0000 +Subject: [PATCH 4/5] Allow for up to 32-bit numbers in the ordin() function in + pcregrep. +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@1615 2f5784b3-3f2a-0410-8824-cb99058d5e15 + +Petr Písař: Ported to 8.38. + +diff --git a/pcregrep.c b/pcregrep.c +index 64986b0..cd53c64 100644 +--- a/pcregrep.c ++++ b/pcregrep.c +@@ -2437,7 +2437,7 @@ return options; + static char * + ordin(int n) + { +-static char buffer[8]; ++static char buffer[14]; + char *p = buffer; + sprintf(p, "%d", n); + while (*p != 0) p++; +-- +2.4.3 + diff --git a/pcre.spec b/pcre.spec index e53b810..bb663f6 100644 --- a/pcre.spec +++ b/pcre.spec @@ -44,6 +44,9 @@ Patch4: pcre-8.38-Fix-bug-for-isolated-E-between-an-item-and-its-quali.patch # Fix crash in regexec() if REG_STARTEND option is set and pmatch argument is # NULL, upstream bug #1727, fixed in upstream after 8.38 Patch5: pcre-8.38-Give-error-for-regexec-with-pmatch-NULL-and-REG_STAR.patch +# Fix a stack overflow when formatting a 32-bit integer in pcregrep tool, +# upstream bug #1728, fixed in upstream after 8.38 +Patch6: pcre-8.38-Allow-for-up-to-32-bit-numbers-in-the-ordin-function.patch BuildRequires: readline-devel BuildRequires: autoconf BuildRequires: automake @@ -98,6 +101,7 @@ Utilities demonstrating PCRE capabilities like pcregrep or pcretest. %patch3 -p1 %patch4 -p1 %patch5 -p1 +%patch6 -p1 # Because of rpath patch libtoolize --copy --force autoreconf -vif @@ -176,6 +180,8 @@ make %{?_smp_mflags} check VERBOSE=yes qualifier with auto-callouts (upstream bug #1724) - Fix crash in regexec() if REG_STARTEND option is set and pmatch argument is NULL (upstream bug #1727) +- Fix a stack overflow when formatting a 32-bit integer in pcregrep tool + (upstream bug #1728) * Fri Nov 27 2015 Petr Pisar - 8.38-2 - Fix compiling comments with auto-callouts