diff --git a/libs/pcre/PRE_BUILD b/libs/pcre/PRE_BUILD
new file mode 100755
index 0000000..fe4a475
--- /dev/null
+++ b/libs/pcre/PRE_BUILD
@@ -0,0 +1,3 @@
+default_pre_build &&
+cd $SOURCE_DIRECTORY &&
+patch -p0 < $SPELL_DIRECTORY/cve-2014-8964
diff --git a/libs/pcre/cve-2014-8964 b/libs/pcre/cve-2014-8964
new file mode 100644
index 0000000..e15e0b0
--- /dev/null
+++ b/libs/pcre/cve-2014-8964
@@ -0,0 +1,15 @@
++++ pcre_exec.c (working copy)
+@@ -1404,8 +1404,11 @@
+ condition = TRUE;
+
+ /* Advance ecode past the assertion to the start of the first
branch,
+- but adjust it so that the general choosing code below works. */
+-
++ but adjust it so that the general choosing code below works. If the
++ assertion has a quantifier that allows zero repeats we must skip
over
++ the BRAZERO. This is a lunatic thing to do, but somebody did! */
++
++ if (*ecode == OP_BRAZERO) ecode++;
+ ecode += GET(ecode, 1);
+ while (*ecode == OP_ALT) ecode += GET(ecode, 1);
+ ecode += 1 + LINK_SIZE - PRIV(OP_lengths)[condcode];
[SM-Commit] GIT changes to master grimoire by Treeve Jelbert (3eeb28eb763df84639402e2525ee4e5c77bfe4f2),
Treeve Jelbert, 11/22/2014