[Swfdec] 2 commits - libswfdec/swfdec_as_interpret.c test/trace
Benjamin Otte
company at kemper.freedesktop.org
Sun Oct 28 11:51:12 PDT 2007
libswfdec/swfdec_as_interpret.c | 1 +
test/trace/Makefile.am | 3 +++
test/trace/crash-0.5.3-divide-by-zero.as | 5 +++++
test/trace/crash-0.5.3-divide-by-zero.swf |binary
test/trace/crash-0.5.3-divide-by-zero.swf.trace | 1 +
5 files changed, 10 insertions(+)
New commits:
commit c6d96d7d47704ca3d62c08d35874c64f7878bdf2
Author: Benjamin Otte <otte at gnome.org>
Date: Sun Oct 28 19:48:40 2007 +0100
fix divide by zero crash
diff --git a/libswfdec/swfdec_as_interpret.c b/libswfdec/swfdec_as_interpret.c
index 7125e05..c331413 100644
--- a/libswfdec/swfdec_as_interpret.c
+++ b/libswfdec/swfdec_as_interpret.c
@@ -948,6 +948,7 @@ swfdec_action_binary (SwfdecAsContext *cx, guint action, const guint8 *data, gui
case SWFDEC_AS_ACTION_DIVIDE:
if (cx->version < 5) {
if (r == 0) {
+ swfdec_as_stack_pop (cx);
SWFDEC_AS_VALUE_SET_STRING (swfdec_as_stack_peek (cx, 1), SWFDEC_AS_STR__ERROR_);
return;
}
commit 45f142e1ddb65fc1c2acf1a37e7ff9f46fba8452
Author: Benjamin Otte <otte at gnome.org>
Date: Sun Oct 28 19:48:29 2007 +0100
Divide by zero crashes in Flash 4
diff --git a/test/trace/Makefile.am b/test/trace/Makefile.am
index d150370..0732b48 100644
--- a/test/trace/Makefile.am
+++ b/test/trace/Makefile.am
@@ -380,6 +380,9 @@ EXTRA_DIST = \
crash-0.5.2-startdrag.as \
crash-0.5.2-startdrag.swf \
crash-0.5.2-startdrag.swf.trace \
+ crash-0.5.3-divide-by-zero.as \
+ crash-0.5.3-divide-by-zero.swf \
+ crash-0.5.3-divide-by-zero.swf.trace \
currentframe.swf \
currentframe.swf.trace \
date.as \
diff --git a/test/trace/crash-0.5.3-divide-by-zero.as b/test/trace/crash-0.5.3-divide-by-zero.as
new file mode 100644
index 0000000..6a94e5a
--- /dev/null
+++ b/test/trace/crash-0.5.3-divide-by-zero.as
@@ -0,0 +1,5 @@
+// makeswf -v 7 -s 200x150 -r 1 -o crash-0.5.3-divide-by-zero.swf crash-0.5.3-divide-by-zero.as
+
+trace (1 / 0);
+
+loadMovie ("fscommand:QUIT", "");
diff --git a/test/trace/crash-0.5.3-divide-by-zero.swf b/test/trace/crash-0.5.3-divide-by-zero.swf
new file mode 100644
index 0000000..6d57b22
Binary files /dev/null and b/test/trace/crash-0.5.3-divide-by-zero.swf differ
diff --git a/test/trace/crash-0.5.3-divide-by-zero.swf.trace b/test/trace/crash-0.5.3-divide-by-zero.swf.trace
new file mode 100644
index 0000000..7f7a506
--- /dev/null
+++ b/test/trace/crash-0.5.3-divide-by-zero.swf.trace
@@ -0,0 +1 @@
+#ERROR#
More information about the Swfdec
mailing list