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

Benjamin Otte company at kemper.freedesktop.org
Fri Sep 14 10:41:42 PDT 2007


 libswfdec/swfdec_as_frame.c           |    2 +-
 test/trace/Makefile.am                |    9 +++++++++
 test/trace/empty-function-5.swf       |binary
 test/trace/empty-function-5.swf.trace |    1 +
 test/trace/empty-function-6.swf       |binary
 test/trace/empty-function-6.swf.trace |    1 +
 test/trace/empty-function-7.swf       |binary
 test/trace/empty-function-7.swf.trace |    1 +
 test/trace/empty-function-8.swf       |binary
 test/trace/empty-function-8.swf.trace |    1 +
 test/trace/empty-function.as          |    8 ++++++++
 11 files changed, 22 insertions(+), 1 deletion(-)

New commits:
diff-tree 7e5f0fc97e0b8852a8856ed6b26dd48a2fcc3ffc (from parents)
Merge: 2be967aec0a62a4a9ec1865fc2932e5e190016bf a9f79ba7051a43ad9dd3297cf711a634e515e540
Author: Benjamin Otte <otte at gnome.org>
Date:   Fri Sep 14 19:39:41 2007 +0200

    Merge branch 'master' of ssh://company@git.freedesktop.org/git/swfdec/swfdec

diff-tree 2be967aec0a62a4a9ec1865fc2932e5e190016bf (from efd982fff6328c40318c9c19b6071a8c09f2e8e3)
Author: Benjamin Otte <otte at gnome.org>
Date:   Fri Sep 14 19:38:10 2007 +0200

    add a test that just calls an empty function
    
    That's a common cause of errors in Swfdec

diff --git a/test/trace/Makefile.am b/test/trace/Makefile.am
index 10e2210..1655625 100644
--- a/test/trace/Makefile.am
+++ b/test/trace/Makefile.am
@@ -439,6 +439,15 @@ EXTRA_DIST = \
 	duplicate-names-7.swf \
 	duplicate-names-7.swf.trace \
 	event-order.swf \
+	empty-function.as \
+	empty-function-5.swf \
+	empty-function-5.swf.trace \
+	empty-function-6.swf \
+	empty-function-6.swf.trace \
+	empty-function-7.swf \
+	empty-function-7.swf.trace \
+	empty-function-8.swf \
+	empty-function-8.swf.trace \
 	empty-stack.as \
 	empty-stack.swf \
 	empty-stack.swf.trace \
diff --git a/test/trace/empty-function-5.swf b/test/trace/empty-function-5.swf
new file mode 100644
index 0000000..a7bc732
Binary files /dev/null and b/test/trace/empty-function-5.swf differ
diff --git a/test/trace/empty-function-5.swf.trace b/test/trace/empty-function-5.swf.trace
new file mode 100644
index 0000000..254f05c
--- /dev/null
+++ b/test/trace/empty-function-5.swf.trace
@@ -0,0 +1 @@
+Just define an empty function and call it. Swfdec likes to crash on that one.
diff --git a/test/trace/empty-function-6.swf b/test/trace/empty-function-6.swf
new file mode 100644
index 0000000..c3fb505
Binary files /dev/null and b/test/trace/empty-function-6.swf differ
diff --git a/test/trace/empty-function-6.swf.trace b/test/trace/empty-function-6.swf.trace
new file mode 100644
index 0000000..254f05c
--- /dev/null
+++ b/test/trace/empty-function-6.swf.trace
@@ -0,0 +1 @@
+Just define an empty function and call it. Swfdec likes to crash on that one.
diff --git a/test/trace/empty-function-7.swf b/test/trace/empty-function-7.swf
new file mode 100644
index 0000000..ccb332e
Binary files /dev/null and b/test/trace/empty-function-7.swf differ
diff --git a/test/trace/empty-function-7.swf.trace b/test/trace/empty-function-7.swf.trace
new file mode 100644
index 0000000..254f05c
--- /dev/null
+++ b/test/trace/empty-function-7.swf.trace
@@ -0,0 +1 @@
+Just define an empty function and call it. Swfdec likes to crash on that one.
diff --git a/test/trace/empty-function-8.swf b/test/trace/empty-function-8.swf
new file mode 100644
index 0000000..0694ff6
Binary files /dev/null and b/test/trace/empty-function-8.swf differ
diff --git a/test/trace/empty-function-8.swf.trace b/test/trace/empty-function-8.swf.trace
new file mode 100644
index 0000000..254f05c
--- /dev/null
+++ b/test/trace/empty-function-8.swf.trace
@@ -0,0 +1 @@
+Just define an empty function and call it. Swfdec likes to crash on that one.
diff --git a/test/trace/empty-function.as b/test/trace/empty-function.as
new file mode 100644
index 0000000..1eb76d6
--- /dev/null
+++ b/test/trace/empty-function.as
@@ -0,0 +1,8 @@
+// makeswf -v 7 -s 200x150 -r 1 -o empty-function.swf empty-function.as
+
+trace ("Just define an empty function and call it. Swfdec likes to crash on that one.");
+
+a = function () {};
+a();
+
+loadMovie ("FSCommand:quit", "");
diff-tree efd982fff6328c40318c9c19b6071a8c09f2e8e3 (from 28bdc729ce326cb4b08540d6e0cae1c67a793ebe)
Author: Benjamin Otte <otte at gnome.org>
Date:   Fri Sep 14 19:35:47 2007 +0200

    allow empty blocks

diff --git a/libswfdec/swfdec_as_frame.c b/libswfdec/swfdec_as_frame.c
index c11c03a..a0db0d3 100644
--- a/libswfdec/swfdec_as_frame.c
+++ b/libswfdec/swfdec_as_frame.c
@@ -212,7 +212,7 @@ swfdec_as_frame_push_block (SwfdecAsFram
   SwfdecAsFrameBlock block = { start, end, func, data, destroy };
 
   g_return_if_fail (SWFDEC_IS_AS_FRAME (frame));
-  g_return_if_fail (start < end);
+  g_return_if_fail (start <= end);
   g_return_if_fail (start >= frame->block_start);
   g_return_if_fail (end <= frame->block_end);
   g_return_if_fail (func != NULL);


More information about the Swfdec mailing list