gnash-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gnash-commit] gnash ChangeLog server/vm/ActionExec.cpp


From: Chad Musick
Subject: [Gnash-commit] gnash ChangeLog server/vm/ActionExec.cpp
Date: Tue, 25 Sep 2007 16:03:26 +0000

CVSROOT:        /sources/gnash
Module name:    gnash
Changes by:     Chad Musick <cmusick>   07/09/25 16:03:26

Modified files:
        .              : ChangeLog 
        server/vm      : ActionExec.cpp 

Log message:
        Fixes bug 21149, trying to read an empty stack.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.4407&r2=1.4408
http://cvs.savannah.gnu.org/viewcvs/gnash/server/vm/ActionExec.cpp?cvsroot=gnash&r1=1.46&r2=1.47

Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/gnash/gnash/ChangeLog,v
retrieving revision 1.4407
retrieving revision 1.4408
diff -u -b -r1.4407 -r1.4408
--- ChangeLog   25 Sep 2007 15:39:48 -0000      1.4407
+++ ChangeLog   25 Sep 2007 16:03:25 -0000      1.4408
@@ -1,3 +1,9 @@
+2007-09-26 Chad Musick <address@hidden>
+
+       * server/vm/ActionExec.cpp: If the stack is empty, there was not
+         an exception. Check for an empty stack first to avoid reading a
+         non-existent value.
+
 2007-09-25 Sandro Santilli <address@hidden>
 
        * gui/gui.{cpp,h}: port SKIP_RENDERING_IF_LATE to use WallClockTimer.

Index: server/vm/ActionExec.cpp
===================================================================
RCS file: /sources/gnash/gnash/server/vm/ActionExec.cpp,v
retrieving revision 1.46
retrieving revision 1.47
diff -u -b -r1.46 -r1.47
--- server/vm/ActionExec.cpp    19 Sep 2007 14:20:51 -0000      1.46
+++ server/vm/ActionExec.cpp    25 Sep 2007 16:03:25 -0000      1.47
@@ -17,7 +17,7 @@
 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 //
 
-/* $Id: ActionExec.cpp,v 1.46 2007/09/19 14:20:51 cmusick Exp $ */
+/* $Id: ActionExec.cpp,v 1.47 2007/09/25 16:03:25 cmusick Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -187,7 +187,7 @@
                        tryBlock& t = mTryList.back();
                        if (t.mState == tryBlock::TRY_TRY)
                        {
-                               if (env.top(0).is_exception()) // We have an 
exception. Catch.
+                               if (env.stack_size() && 
env.top(0).is_exception()) // We have an exception. Catch.
                                {
                                        as_value exc = env.pop();
                                        pc = t.mCatchOffset;
@@ -223,7 +223,7 @@
                                // Here's a fine mess. We've thrown, but we 
still need to
                                // go to finally.
 
-                               if (env.top(0).is_exception())
+                               if (env.stack_size() && 
env.top(0).is_exception())
                                {
                                        // If we set a variable, erase it.
                                        if (t.mNamed)
@@ -248,7 +248,7 @@
                                mTryList.pop_back();
 
                                // If there is an exception, we're throwing 
from finally.
-                               if (env.top(0).is_exception())
+                               if (env.stack_size() && 
env.top(0).is_exception())
                                {
                                        continue; // Leaving it does right.
                                }




reply via email to

[Prev in Thread] Current Thread [Next in Thread]