File 0003-Fix-heap-overflow-with-unmatched-closing-parens.patch of Package erlang

From 498cf26aecb4f471a269e6fb562d2a9820fd6145 Mon Sep 17 00:00:00 2001
From: Zephyr Pellerin <zv@nxvr.org>
Date: Sat, 18 Jun 2016 16:13:54 -0700
Subject: [PATCH 3/3] Fix heap overflow with unmatched closing parens

This bug can trigger vulnerable code in find_fixedlength for forward reference
within backward assertion with excess closing parenthesis.
---
 erts/emulator/pcre/pcre_compile.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/erts/emulator/pcre/pcre_compile.c b/erts/emulator/pcre/pcre_compile.c
index e422e54f73..7050e2e6c2 100644
--- a/erts/emulator/pcre/pcre_compile.c
+++ b/erts/emulator/pcre/pcre_compile.c
@@ -8260,7 +8260,7 @@ OP_RECURSE that are not fixed length get a diagnosic with a useful offset. The
 exceptional ones forgo this. We scan the pattern to check that they are fixed
 length, and set their lengths. */
 
-if (cd->check_lookbehind)
+if (errorcode == 0 && cd->check_lookbehind)
   {
   pcre_uchar *cc = (pcre_uchar *)codestart;
 
-- 
2.13.6

openSUSE Build Service is sponsored by