[Pcre-svn] [792] code/trunk: Fix a possible uninitialized me…

Startseite
Nachricht löschen
Autor: Subversion repository
Datum:  
To: pcre-svn
Betreff: [Pcre-svn] [792] code/trunk: Fix a possible uninitialized memory bug.
Revision: 792
          http://vcs.pcre.org/viewvc?view=rev&revision=792
Author:   ph10
Date:     2011-12-07 16:44:48 +0000 (Wed, 07 Dec 2011)


Log Message:
-----------
Fix a possible uninitialized memory bug.

Modified Paths:
--------------
    code/trunk/ChangeLog
    code/trunk/pcre_jit_compile.c


Modified: code/trunk/ChangeLog
===================================================================
--- code/trunk/ChangeLog    2011-12-07 16:38:03 UTC (rev 791)
+++ code/trunk/ChangeLog    2011-12-07 16:44:48 UTC (rev 792)
@@ -111,7 +111,9 @@


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
------------------------


Modified: code/trunk/pcre_jit_compile.c
===================================================================
--- code/trunk/pcre_jit_compile.c    2011-12-07 16:38:03 UTC (rev 791)
+++ code/trunk/pcre_jit_compile.c    2011-12-07 16:44:48 UTC (rev 792)
@@ -5698,7 +5698,8 @@
     {
     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));