summaryrefslogtreecommitdiff
path: root/debian/patches/PCRE6_compatible_API.patch
diff options
context:
space:
mode:
authorIvo De Decker <ivodd@debian.org>2014-12-06 18:58:19 +0000
committerIvo De Decker <ivodd@debian.org>2014-12-06 18:58:19 +0000
commitdd986e8b547c0dde924c4b566ad0894ad4f1beb9 (patch)
treea87ee49df2a732f2be8d1b3c9e46a341e6fb8698 /debian/patches/PCRE6_compatible_API.patch
pcre3 (2:8.35-3.3) unstable; urgency=medium
* Non-maintainer upload. * Upstream patch for heap buffer overflow, CVE-2014-8964, taken from 1:8.36-1 (Closes: #770478) Thanks to Salvatore Bonaccorso for the reminder. # imported from the archive
Diffstat (limited to 'debian/patches/PCRE6_compatible_API.patch')
-rw-r--r--debian/patches/PCRE6_compatible_API.patch40
1 files changed, 40 insertions, 0 deletions
diff --git a/debian/patches/PCRE6_compatible_API.patch b/debian/patches/PCRE6_compatible_API.patch
new file mode 100644
index 0000000..f13a763
--- /dev/null
+++ b/debian/patches/PCRE6_compatible_API.patch
@@ -0,0 +1,40 @@
+From: Mark Baker <mark@mnb.org.uk>
+Description: Include old interface to RE::Init() for PCRE 6.x compatibility
+
+--- a/pcrecpp.cc
++++ b/pcrecpp.cc
+@@ -80,6 +80,12 @@
+ // If the user doesn't ask for any options, we just use this one
+ static RE_Options default_options;
+
++// PCRE6.x compatible API
++void RE::Init(const char *c_pat, const RE_Options* options) {
++ const string cxx_pat(c_pat);
++ Init(cxx_pat, options);
++}
++
+ void RE::Init(const string& pat, const RE_Options* options) {
+ pattern_ = pat;
+ if (options == NULL) {
+--- a/pcrecpp.h
++++ b/pcrecpp.h
+@@ -658,6 +658,8 @@
+ private:
+
+ void Init(const string& pattern, const RE_Options* options);
++ // Old version from PCRE 6.x, for compatibility
++ void Init(const char *pattern, const RE_Options* options);
+ void Cleanup();
+
+ // Match against "text", filling in "vec" (up to "vecsize" * 2/3) with
+--- a/pcretest.c
++++ b/pcretest.c
+@@ -2976,7 +2976,7 @@
+ {
+ FILE *infile = stdin;
+ const char *version;
+-int options = 0;
++long int options = 0;
+ int study_options = 0;
+ int default_find_match_limit = FALSE;
+ pcre_uint32 default_options = 0;