[Swfdec] 3 commits - libswfdec/swfdec_as_context.c libswfdec/swfdec_movie.c test/trace

Benjamin Otte company at kemper.freedesktop.org
Tue Dec 11 02:42:18 PST 2007


 libswfdec/swfdec_as_context.c                           |    2 +-
 libswfdec/swfdec_movie.c                                |    2 +-
 test/trace/Makefile.am                                  |   15 +++++++++++++++
 test/trace/crash-0.5.4-13491-stack-overflow-5.swf       |binary
 test/trace/crash-0.5.4-13491-stack-overflow-5.swf.trace |    1 +
 test/trace/crash-0.5.4-13491-stack-overflow-6.swf       |binary
 test/trace/crash-0.5.4-13491-stack-overflow-6.swf.trace |    1 +
 test/trace/crash-0.5.4-13491-stack-overflow-7.swf       |binary
 test/trace/crash-0.5.4-13491-stack-overflow-7.swf.trace |    1 +
 test/trace/crash-0.5.4-13491-stack-overflow-8.swf       |binary
 test/trace/crash-0.5.4-13491-stack-overflow-8.swf.trace |    1 +
 test/trace/crash-0.5.4-13491-stack-overflow.as          |    6 ++++++
 test/trace/crash-0.5.4-huge-image-7.swf                 |binary
 test/trace/crash-0.5.4-huge-image-8.swf                 |binary
 test/trace/crash-0.5.4-huge-image.as                    |    8 ++++++++
 test/trace/swfdec-huge.jpg                              |binary
 16 files changed, 35 insertions(+), 2 deletions(-)

New commits:
commit 52f6cf4b58613870e52ef9c7da34c65f02e1100c
Author: Benjamin Otte <otte at gnome.org>
Date:   Tue Dec 11 11:42:02 2007 +0100

    add a test for just-fixed crash

diff --git a/test/trace/Makefile.am b/test/trace/Makefile.am
index 4310297..fe46006 100644
--- a/test/trace/Makefile.am
+++ b/test/trace/Makefile.am
@@ -616,6 +616,15 @@ EXTRA_DIST = \
 	crash-0.5.4-13379-catch-in-register.swf \
 	crash-0.5.4-13379-catch-in-register.swf.trace \
 	crash-0.5.4-13379-catch-in-register.xml \
+	crash-0.5.4-13491-stack-overflow.as \
+	crash-0.5.4-13491-stack-overflow-5.swf \
+	crash-0.5.4-13491-stack-overflow-5.swf.trace \
+	crash-0.5.4-13491-stack-overflow-6.swf \
+	crash-0.5.4-13491-stack-overflow-6.swf.trace \
+	crash-0.5.4-13491-stack-overflow-7.swf \
+	crash-0.5.4-13491-stack-overflow-7.swf.trace \
+	crash-0.5.4-13491-stack-overflow-8.swf \
+	crash-0.5.4-13491-stack-overflow-8.swf.trace \
 	crash-0.5.4-goto-in-constructor.c \
 	crash-0.5.4-goto-in-constructor-5.swf \
 	crash-0.5.4-goto-in-constructor-5.swf.trace \
diff --git a/test/trace/crash-0.5.4-13491-stack-overflow-5.swf b/test/trace/crash-0.5.4-13491-stack-overflow-5.swf
new file mode 100644
index 0000000..421fa06
Binary files /dev/null and b/test/trace/crash-0.5.4-13491-stack-overflow-5.swf differ
diff --git a/test/trace/crash-0.5.4-13491-stack-overflow-5.swf.trace b/test/trace/crash-0.5.4-13491-stack-overflow-5.swf.trace
new file mode 100644
index 0000000..ac60b93
--- /dev/null
+++ b/test/trace/crash-0.5.4-13491-stack-overflow-5.swf.trace
@@ -0,0 +1 @@
+[type Object]
diff --git a/test/trace/crash-0.5.4-13491-stack-overflow-6.swf b/test/trace/crash-0.5.4-13491-stack-overflow-6.swf
new file mode 100644
index 0000000..78a6bb4
Binary files /dev/null and b/test/trace/crash-0.5.4-13491-stack-overflow-6.swf differ
diff --git a/test/trace/crash-0.5.4-13491-stack-overflow-6.swf.trace b/test/trace/crash-0.5.4-13491-stack-overflow-6.swf.trace
new file mode 100644
index 0000000..ac60b93
--- /dev/null
+++ b/test/trace/crash-0.5.4-13491-stack-overflow-6.swf.trace
@@ -0,0 +1 @@
+[type Object]
diff --git a/test/trace/crash-0.5.4-13491-stack-overflow-7.swf b/test/trace/crash-0.5.4-13491-stack-overflow-7.swf
new file mode 100644
index 0000000..a2043ad
Binary files /dev/null and b/test/trace/crash-0.5.4-13491-stack-overflow-7.swf differ
diff --git a/test/trace/crash-0.5.4-13491-stack-overflow-7.swf.trace b/test/trace/crash-0.5.4-13491-stack-overflow-7.swf.trace
new file mode 100644
index 0000000..ac60b93
--- /dev/null
+++ b/test/trace/crash-0.5.4-13491-stack-overflow-7.swf.trace
@@ -0,0 +1 @@
+[type Object]
diff --git a/test/trace/crash-0.5.4-13491-stack-overflow-8.swf b/test/trace/crash-0.5.4-13491-stack-overflow-8.swf
new file mode 100644
index 0000000..a41f059
Binary files /dev/null and b/test/trace/crash-0.5.4-13491-stack-overflow-8.swf differ
diff --git a/test/trace/crash-0.5.4-13491-stack-overflow-8.swf.trace b/test/trace/crash-0.5.4-13491-stack-overflow-8.swf.trace
new file mode 100644
index 0000000..ac60b93
--- /dev/null
+++ b/test/trace/crash-0.5.4-13491-stack-overflow-8.swf.trace
@@ -0,0 +1 @@
+[type Object]
diff --git a/test/trace/crash-0.5.4-13491-stack-overflow.as b/test/trace/crash-0.5.4-13491-stack-overflow.as
new file mode 100644
index 0000000..16c0e3d
--- /dev/null
+++ b/test/trace/crash-0.5.4-13491-stack-overflow.as
@@ -0,0 +1,6 @@
+// makeswf -v 7 -s 200x150 -r 1 -o crash-0.5.4-13491-stack-overflow.swf crash-0.5.4-13491-stack-overflow.as
+
+x = { toString: function () { return String (this); } };
+
+trace (x);
+loadMovie ("fscommand:quit", "");
commit 6495efaab49bd9a19b57c11a4b23e1db00fdd868
Author: Benjamin Otte <otte at gnome.org>
Date:   Tue Dec 11 11:40:12 2007 +0100

    properly exit when hitting a stack overflow (fixes #13491)

diff --git a/libswfdec/swfdec_as_context.c b/libswfdec/swfdec_as_context.c
index 320ec0a..25f3958 100644
--- a/libswfdec/swfdec_as_context.c
+++ b/libswfdec/swfdec_as_context.c
@@ -802,7 +802,7 @@ start:
   if (context->call_depth > 256) {
     /* we've exceeded our maximum call depth, throw an error and abort */
     swfdec_as_context_abort (context, "Stack overflow");
-    return;
+    goto error;
   }
   /* if security is NULL, the function may not be called */
   if (frame->security == NULL) {
commit 122f8a63541ce1e6e88f48bc20437fe3743c537f
Author: Benjamin Otte <otte at gnome.org>
Date:   Tue Dec 11 09:53:30 2007 +0100

    add testcase for #13529

diff --git a/libswfdec/swfdec_movie.c b/libswfdec/swfdec_movie.c
index cf6786a..92a0edb 100644
--- a/libswfdec/swfdec_movie.c
+++ b/libswfdec/swfdec_movie.c
@@ -1604,8 +1604,8 @@ swfdec_movie_set_static_properties (SwfdecMovie *movie, const cairo_matrix_t *tr
     movie->rotation = swfdec_matrix_get_rotation (&movie->original_transform);
   }
   if (ctrans) {
-    movie->original_ctrans = *ctrans;
     swfdec_movie_invalidate_last (movie);
+    movie->original_ctrans = *ctrans;
   }
   if (ratio >= 0 && (guint) ratio != movie->original_ratio) {
     SwfdecMovieClass *klass;
diff --git a/test/trace/Makefile.am b/test/trace/Makefile.am
index b8231c0..4310297 100644
--- a/test/trace/Makefile.am
+++ b/test/trace/Makefile.am
@@ -625,6 +625,11 @@ EXTRA_DIST = \
 	crash-0.5.4-goto-in-constructor-7.swf.trace \
 	crash-0.5.4-goto-in-constructor-8.swf \
 	crash-0.5.4-goto-in-constructor-8.swf.trace \
+	crash-0.5.4-huge-image.as \
+	crash-0.5.4-huge-image-7.swf \
+	crash-0.5.4-huge-image-7.swf.trace \
+	crash-0.5.4-huge-image-8.swf \
+	crash-0.5.4-huge-image-8.swf.trace \
 	currentframe.swf \
 	currentframe.swf.trace \
 	dangling-compare.as \
@@ -2723,6 +2728,7 @@ EXTRA_DIST = \
 	super-this-8.swf \
 	super-this-8.swf.trace \
 	swfdec.jpg \
+	swfdec-huge.jpg \
 	system-capabilities-query.as \
 	system-capabilities-query-5.swf \
 	system-capabilities-query-5.swf.trace \
diff --git a/test/trace/crash-0.5.4-huge-image-7.swf b/test/trace/crash-0.5.4-huge-image-7.swf
new file mode 100644
index 0000000..93bded2
Binary files /dev/null and b/test/trace/crash-0.5.4-huge-image-7.swf differ
diff --git a/test/trace/crash-0.5.4-huge-image-7.swf.trace b/test/trace/crash-0.5.4-huge-image-7.swf.trace
new file mode 100644
index 0000000..e69de29
diff --git a/test/trace/crash-0.5.4-huge-image-8.swf b/test/trace/crash-0.5.4-huge-image-8.swf
new file mode 100644
index 0000000..6bf4c41
Binary files /dev/null and b/test/trace/crash-0.5.4-huge-image-8.swf differ
diff --git a/test/trace/crash-0.5.4-huge-image-8.swf.trace b/test/trace/crash-0.5.4-huge-image-8.swf.trace
new file mode 100644
index 0000000..e69de29
diff --git a/test/trace/crash-0.5.4-huge-image.as b/test/trace/crash-0.5.4-huge-image.as
new file mode 100644
index 0000000..c633ba8
--- /dev/null
+++ b/test/trace/crash-0.5.4-huge-image.as
@@ -0,0 +1,8 @@
+// makeswf -v 7 -s 200x150 -r 1 -o crash-0.5.4-huge-image.swf crash-0.5.4-huge-image.as
+
+l = new MovieClipLoader ();
+createEmptyMovieClip ("a", 0);
+l.loadClip ("swfdec-huge.jpg", a);
+l.onLoadInit = function () {
+  loadMovie ("fscommand:quit", "");
+};
diff --git a/test/trace/swfdec-huge.jpg b/test/trace/swfdec-huge.jpg
new file mode 100644
index 0000000..48ff966
Binary files /dev/null and b/test/trace/swfdec-huge.jpg differ


More information about the Swfdec mailing list