summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorph10 <ph10@2f5784b3-3f2a-0410-8824-cb99058d5e15>2011-12-07 16:44:48 +0000
committerph10 <ph10@2f5784b3-3f2a-0410-8824-cb99058d5e15>2011-12-07 16:44:48 +0000
commit39336d4ddf36c07d131429715ad809074d0bb938 (patch)
tree10ad39415ff90ad3827c53c2e1b334397a582d79
parent7e82bcc12b31e156577d707c20445f9d58958be8 (diff)
downloadpcre-39336d4ddf36c07d131429715ad809074d0bb938.tar.gz
Fix a possible uninitialized memory bug.
git-svn-id: svn://vcs.exim.org/pcre/code/trunk@792 2f5784b3-3f2a-0410-8824-cb99058d5e15
-rw-r--r--ChangeLog2
-rw-r--r--pcre_jit_compile.c3
2 files changed, 4 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 226804c..fc0d82b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -111,6 +111,8 @@ Version 8.21 05-Dec-2011
27. Updated RunTest.bat as provided by Sheri Pierce.
+28. Fixed a possible uninitialized memory bug in pcre_jit_compile.c.
+
Version 8.20 21-Oct-2011
------------------------
diff --git a/pcre_jit_compile.c b/pcre_jit_compile.c
index 6f2bad0..1bf951a 100644
--- a/pcre_jit_compile.c
+++ b/pcre_jit_compile.c
@@ -5698,7 +5698,8 @@ if (has_alternatives)
{
SLJIT_ASSERT(opcode == OP_COND || opcode == OP_SCOND);
assert = CURRENT_AS(bracket_fallback)->u.assert;
- if (assert->framesize >= 0 && (ccbegin[1 + LINK_SIZE] == OP_ASSERT_NOT || ccbegin[1 + LINK_SIZE] == OP_ASSERTBACK_NOT))
+ if ((ccbegin[1 + LINK_SIZE] == OP_ASSERT_NOT || ccbegin[1 + LINK_SIZE] == OP_ASSERTBACK_NOT) && assert->framesize >= 0)
+
{
OP1(SLJIT_MOV, STACK_TOP, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), assert->localptr);
add_jump(compiler, &common->revertframes, JUMP(SLJIT_FAST_CALL));