diff options
author | Alexander Barkov <bar@mnogosearch.org> | 2014-02-03 08:54:12 +0400 |
---|---|---|
committer | Alexander Barkov <bar@mnogosearch.org> | 2014-02-03 08:54:12 +0400 |
commit | 74cca641557196512468fafe77d22bfea4f243ea (patch) | |
tree | 4df5f82f7210d72a0ec3dcc2f9b49d50612b6a3a /pcre/maria-patches | |
parent | 2acc01b3cfa27074f93016b893cda20fa0a3497f (diff) | |
download | mariadb-git-74cca641557196512468fafe77d22bfea4f243ea.tar.gz |
Upgrading the bundled PCRE to 8.34
Diffstat (limited to 'pcre/maria-patches')
-rw-r--r-- | pcre/maria-patches/pcre_stack_guard.diff | 57 |
1 files changed, 57 insertions, 0 deletions
diff --git a/pcre/maria-patches/pcre_stack_guard.diff b/pcre/maria-patches/pcre_stack_guard.diff new file mode 100644 index 00000000000..8cf4b7dbb34 --- /dev/null +++ b/pcre/maria-patches/pcre_stack_guard.diff @@ -0,0 +1,57 @@ +=== modified file 'pcre/pcre.h.in' +--- pcre/pcre.h.in 2013-09-26 14:02:17 +0000 ++++ pcre/pcre.h.in 2013-10-02 07:58:29 +0000 +@@ -486,6 +486,7 @@ PCRE_EXP_DECL void (*pcre_free)(void *) + PCRE_EXP_DECL void *(*pcre_stack_malloc)(size_t); + PCRE_EXP_DECL void (*pcre_stack_free)(void *); + PCRE_EXP_DECL int (*pcre_callout)(pcre_callout_block *); ++PCRE_EXP_DECL int (*pcre_stack_guard)(void); + + PCRE_EXP_DECL void *(*pcre16_malloc)(size_t); + PCRE_EXP_DECL void (*pcre16_free)(void *); +@@ -504,6 +505,7 @@ PCRE_EXP_DECL void pcre_free(void *); + PCRE_EXP_DECL void *pcre_stack_malloc(size_t); + PCRE_EXP_DECL void pcre_stack_free(void *); + PCRE_EXP_DECL int pcre_callout(pcre_callout_block *); ++PCRE_EXP_DECL int pcre_stack_guard(void); + + PCRE_EXP_DECL void *pcre16_malloc(size_t); + PCRE_EXP_DECL void pcre16_free(void *); + +=== modified file 'pcre/pcre_compile.c' +--- pcre/pcre_compile.c 2013-09-26 14:02:17 +0000 ++++ pcre/pcre_compile.c 2013-10-02 07:58:29 +0000 +@@ -7107,6 +7107,12 @@ unsigned int orig_bracount; + unsigned int max_bracount; + branch_chain bc; + ++if (pcre_stack_guard && pcre_stack_guard()) ++{ ++ *errorcodeptr= ERR23; ++ return FALSE; ++} ++ + bc.outer = bcptr; + bc.current_branch = code; + + +=== modified file 'pcre/pcre_globals.c' +--- pcre/pcre_globals.c 2013-09-26 14:02:17 +0000 ++++ pcre/pcre_globals.c 2013-10-02 07:58:29 +0000 +@@ -72,6 +72,7 @@ PCRE_EXP_DATA_DEFN void (*PUBL(free))(v + PCRE_EXP_DATA_DEFN void *(*PUBL(stack_malloc))(size_t) = LocalPcreMalloc; + PCRE_EXP_DATA_DEFN void (*PUBL(stack_free))(void *) = LocalPcreFree; + PCRE_EXP_DATA_DEFN int (*PUBL(callout))(PUBL(callout_block) *) = NULL; ++PCRE_EXP_DATA_DEFN int (*PUBL(stack_guard))(void) = NULL; + + #elif !defined VPCOMPAT + PCRE_EXP_DATA_DEFN void *(*PUBL(malloc))(size_t) = malloc; +@@ -79,6 +80,7 @@ PCRE_EXP_DATA_DEFN void (*PUBL(free))(v + PCRE_EXP_DATA_DEFN void *(*PUBL(stack_malloc))(size_t) = malloc; + PCRE_EXP_DATA_DEFN void (*PUBL(stack_free))(void *) = free; + PCRE_EXP_DATA_DEFN int (*PUBL(callout))(PUBL(callout_block) *) = NULL; ++PCRE_EXP_DATA_DEFN int (*PUBL(stack_guard))(void) = NULL; + #endif + + /* End of pcre_globals.c */ + |