[Swfdec-commits] 3 commits - swfdec/swfdec_as_object.c test/trace
Pekka Lampila
medar at kemper.freedesktop.org
Wed Jul 9 03:17:06 PDT 2008
swfdec/swfdec_as_object.c | 1 +
test/trace/Makefile.am | 9 +++++++++
test/trace/crash-0.6.6-prototype-recursion-5.swf |binary
test/trace/crash-0.6.6-prototype-recursion-5.swf.trace | 1 +
test/trace/crash-0.6.6-prototype-recursion-6.swf |binary
test/trace/crash-0.6.6-prototype-recursion-6.swf.trace | 1 +
test/trace/crash-0.6.6-prototype-recursion-7.swf |binary
test/trace/crash-0.6.6-prototype-recursion-7.swf.trace | 1 +
test/trace/crash-0.6.6-prototype-recursion-8.swf |binary
test/trace/crash-0.6.6-prototype-recursion-8.swf.trace | 1 +
test/trace/crash-0.6.6-prototype-recursion.as | 11 +++++++++++
11 files changed, 25 insertions(+)
New commits:
commit 30a6200ade9635a6b254215691774764f80a8217
Merge: ded13b7... c945127...
Author: Pekka Lampila <pekka.lampila at iki.fi>
Date: Wed Jul 9 13:10:42 2008 +0300
Merge branch '0.6'
commit c9451278eb423c819c05ce88d36046ef64e0d343
Author: Pekka Lampila <pekka.lampila at iki.fi>
Date: Wed Jul 9 13:08:36 2008 +0300
Add a test for the crash fix in last commit (prototype recursion limit)
diff --git a/test/trace/Makefile.am b/test/trace/Makefile.am
index 97247f9..4b38807 100644
--- a/test/trace/Makefile.am
+++ b/test/trace/Makefile.am
@@ -851,6 +851,15 @@ EXTRA_DIST = \
crash-0.6.6-date-8.swf \
crash-0.6.6-date-8.swf.trace \
crash-0.6.6-date.as \
+ crash-0.6.6-prototype-recursion-5.swf \
+ crash-0.6.6-prototype-recursion-5.swf.trace \
+ crash-0.6.6-prototype-recursion-6.swf \
+ crash-0.6.6-prototype-recursion-6.swf.trace \
+ crash-0.6.6-prototype-recursion-7.swf \
+ crash-0.6.6-prototype-recursion-7.swf.trace \
+ crash-0.6.6-prototype-recursion-8.swf \
+ crash-0.6.6-prototype-recursion-8.swf.trace \
+ crash-0.6.6-prototype-recursion.as \
crash-0.6.6-variable-leak-5.swf \
crash-0.6.6-variable-leak-5.swf.trace \
crash-0.6.6-variable-leak-6.swf \
diff --git a/test/trace/crash-0.6.6-prototype-recursion-5.swf b/test/trace/crash-0.6.6-prototype-recursion-5.swf
new file mode 100644
index 0000000..0fc68ff
Binary files /dev/null and b/test/trace/crash-0.6.6-prototype-recursion-5.swf differ
diff --git a/test/trace/crash-0.6.6-prototype-recursion-5.swf.trace b/test/trace/crash-0.6.6-prototype-recursion-5.swf.trace
new file mode 100644
index 0000000..e530efe
--- /dev/null
+++ b/test/trace/crash-0.6.6-prototype-recursion-5.swf.trace
@@ -0,0 +1 @@
+Crash in certain case when prototype recursion limit is exceeded
diff --git a/test/trace/crash-0.6.6-prototype-recursion-6.swf b/test/trace/crash-0.6.6-prototype-recursion-6.swf
new file mode 100644
index 0000000..37c1609
Binary files /dev/null and b/test/trace/crash-0.6.6-prototype-recursion-6.swf differ
diff --git a/test/trace/crash-0.6.6-prototype-recursion-6.swf.trace b/test/trace/crash-0.6.6-prototype-recursion-6.swf.trace
new file mode 100644
index 0000000..e530efe
--- /dev/null
+++ b/test/trace/crash-0.6.6-prototype-recursion-6.swf.trace
@@ -0,0 +1 @@
+Crash in certain case when prototype recursion limit is exceeded
diff --git a/test/trace/crash-0.6.6-prototype-recursion-7.swf b/test/trace/crash-0.6.6-prototype-recursion-7.swf
new file mode 100644
index 0000000..a888b25
Binary files /dev/null and b/test/trace/crash-0.6.6-prototype-recursion-7.swf differ
diff --git a/test/trace/crash-0.6.6-prototype-recursion-7.swf.trace b/test/trace/crash-0.6.6-prototype-recursion-7.swf.trace
new file mode 100644
index 0000000..e530efe
--- /dev/null
+++ b/test/trace/crash-0.6.6-prototype-recursion-7.swf.trace
@@ -0,0 +1 @@
+Crash in certain case when prototype recursion limit is exceeded
diff --git a/test/trace/crash-0.6.6-prototype-recursion-8.swf b/test/trace/crash-0.6.6-prototype-recursion-8.swf
new file mode 100644
index 0000000..4649818
Binary files /dev/null and b/test/trace/crash-0.6.6-prototype-recursion-8.swf differ
diff --git a/test/trace/crash-0.6.6-prototype-recursion-8.swf.trace b/test/trace/crash-0.6.6-prototype-recursion-8.swf.trace
new file mode 100644
index 0000000..e530efe
--- /dev/null
+++ b/test/trace/crash-0.6.6-prototype-recursion-8.swf.trace
@@ -0,0 +1 @@
+Crash in certain case when prototype recursion limit is exceeded
diff --git a/test/trace/crash-0.6.6-prototype-recursion.as b/test/trace/crash-0.6.6-prototype-recursion.as
new file mode 100644
index 0000000..3147e4e
--- /dev/null
+++ b/test/trace/crash-0.6.6-prototype-recursion.as
@@ -0,0 +1,11 @@
+// makeswf -v 7 -r 15 -o crash-0.6.6-prototype-recursion.swf crash-0.6.6-prototype-recursion.as
+
+trace ("Crash in certain case when prototype recursion limit is exceeded");
+
+function get () { return "hello"; };
+function set () { };
+
+var a = {};
+a.__proto__.__proto__ = {};
+a.__proto__.__proto__.addProperty ("test", get, set);
+a.test = "hello2";
commit 9830328c5d4ec0559f8608ea94fe0b4d11a1c366
Author: Pekka Lampila <pekka.lampila at iki.fi>
Date: Wed Jul 9 13:05:50 2008 +0300
Fix setting value when getting a variable and prototype recursion limit is hit
This could cause a crash
diff --git a/swfdec/swfdec_as_object.c b/swfdec/swfdec_as_object.c
index 1c379c6..e6a7862 100644
--- a/swfdec/swfdec_as_object.c
+++ b/swfdec/swfdec_as_object.c
@@ -958,6 +958,7 @@ swfdec_as_object_get_variable_and_flags (SwfdecAsObject *object,
}
if (i > SWFDEC_AS_OBJECT_PROTOTYPE_RECURSION_LIMIT) {
swfdec_as_context_abort (object->context, "Prototype recursion limit exceeded");
+ SWFDEC_AS_VALUE_SET_UNDEFINED (value);
*flags = 0;
*pobject = NULL;
return FALSE;
More information about the Swfdec-commits
mailing list