[Swfdec] 6 commits - libswfdec/swfdec_as_frame.c libswfdec/swfdec_as_internal.h libswfdec/swfdec_as_interpret.c libswfdec/swfdec_as_interpret.h libswfdec/swfdec_as_object.c libswfdec/swfdec_as_script_function.c libswfdec/swfdec_flash_security.c libswfdec/swfdec_movie.c libswfdec/swfdec_security_allow.c libswfdec/swfdec_security.c libswfdec/swfdec_security.h libswfdec/swfdec_tag.c libswfdec/swfdec_tag.h

Benjamin Otte company at kemper.freedesktop.org
Tue Oct 23 12:36:54 PDT 2007


 libswfdec/swfdec_as_frame.c           |   17 ++++---------
 libswfdec/swfdec_as_internal.h        |    7 +++++
 libswfdec/swfdec_as_interpret.c       |    2 +
 libswfdec/swfdec_as_interpret.h       |    2 +
 libswfdec/swfdec_as_object.c          |   42 ++++++++++++++++++++++++----------
 libswfdec/swfdec_as_script_function.c |    2 +
 libswfdec/swfdec_flash_security.c     |   12 ++++-----
 libswfdec/swfdec_movie.c              |    6 +++-
 libswfdec/swfdec_security.c           |   12 ++++-----
 libswfdec/swfdec_security.h           |    4 +--
 libswfdec/swfdec_security_allow.c     |    4 +--
 libswfdec/swfdec_tag.c                |   15 ++++++++----
 libswfdec/swfdec_tag.h                |   23 +++++++++++++++++-
 13 files changed, 98 insertions(+), 50 deletions(-)

New commits:
commit 3cc196c97cc658820304c73f72ec657eed9c4a22
Merge: 0863ec7... c0b1609...
Author: Benjamin Otte <otte at gnome.org>
Date:   Tue Oct 23 21:36:45 2007 +0200

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

commit 0863ec7ef74755b65212798418d84ce16c226d5b
Author: Benjamin Otte <otte at gnome.org>
Date:   Tue Oct 23 14:58:22 2007 +0200

    add swfdec_as_object_call_with_security() and use it

diff --git a/libswfdec/swfdec_as_internal.h b/libswfdec/swfdec_as_internal.h
index 98cb9ee..155cf3e 100644
--- a/libswfdec/swfdec_as_internal.h
+++ b/libswfdec/swfdec_as_internal.h
@@ -52,6 +52,13 @@ typedef SwfdecAsVariableForeach SwfdecAsVariableForeachRemove;
 typedef const char *(* SwfdecAsVariableForeachRename) (SwfdecAsObject *object, 
     const char *variable, SwfdecAsValue *value, guint flags, gpointer data);
 
+void		swfdec_as_object_call_with_security
+						(SwfdecAsObject *	object,
+						 SwfdecSecurity *	sec,
+						 const char *		name,
+						 guint			argc,
+						 SwfdecAsValue *	argv,
+						 SwfdecAsValue *	return_value);
 void		swfdec_as_object_collect	(SwfdecAsObject *     	object);
 guint		swfdec_as_object_foreach_remove	(SwfdecAsObject *       object,
 						 SwfdecAsVariableForeach func,
diff --git a/libswfdec/swfdec_as_object.c b/libswfdec/swfdec_as_object.c
index 765a56c..ed0ae49 100644
--- a/libswfdec/swfdec_as_object.c
+++ b/libswfdec/swfdec_as_object.c
@@ -1056,6 +1056,32 @@ swfdec_as_object_run (SwfdecAsObject *object, SwfdecScript *script)
   g_object_unref (sec);
 }
 
+void
+swfdec_as_object_call_with_security (SwfdecAsObject *object, SwfdecSecurity *sec,
+    const char *name, guint argc, SwfdecAsValue *argv, SwfdecAsValue *return_value) 
+{
+  static SwfdecAsValue tmp; /* ignored */
+  SwfdecAsFunction *fun;
+
+  g_return_if_fail (SWFDEC_IS_AS_OBJECT (object));
+  g_return_if_fail (SWFDEC_IS_SECURITY (sec));
+  g_return_if_fail (name != NULL);
+  g_return_if_fail (argc == 0 || argv != NULL);
+  g_return_if_fail (argc == 0 || argv != NULL);
+
+  if (return_value)
+    SWFDEC_AS_VALUE_SET_UNDEFINED (return_value);
+  swfdec_as_object_get_variable (object, name, &tmp);
+  if (!SWFDEC_AS_VALUE_IS_OBJECT (&tmp))
+    return;
+  fun = (SwfdecAsFunction *) SWFDEC_AS_VALUE_GET_OBJECT (&tmp);
+  if (!SWFDEC_IS_AS_FUNCTION (fun))
+    return;
+  swfdec_as_function_call (fun, object, argc, argv, return_value ? return_value : &tmp);
+  swfdec_as_frame_set_security (object->context->frame, sec);
+  swfdec_as_context_run (object->context);
+}
+
 /**
  * swfdec_as_object_call:
  * @object: a #SwfdecAsObject
@@ -1075,23 +1101,15 @@ void
 swfdec_as_object_call (SwfdecAsObject *object, const char *name, guint argc, 
     SwfdecAsValue *argv, SwfdecAsValue *return_value)
 {
-  static SwfdecAsValue tmp; /* ignored */
-  SwfdecAsFunction *fun;
+  SwfdecSecurity *sec;
 
   g_return_if_fail (SWFDEC_IS_AS_OBJECT (object));
   g_return_if_fail (name != NULL);
   g_return_if_fail (argc == 0 || argv != NULL);
 
-  if (return_value)
-    SWFDEC_AS_VALUE_SET_UNDEFINED (return_value);
-  swfdec_as_object_get_variable (object, name, &tmp);
-  if (!SWFDEC_AS_VALUE_IS_OBJECT (&tmp))
-    return;
-  fun = (SwfdecAsFunction *) SWFDEC_AS_VALUE_GET_OBJECT (&tmp);
-  if (!SWFDEC_IS_AS_FUNCTION (fun))
-    return;
-  swfdec_as_function_call (fun, object, argc, argv, return_value ? return_value : &tmp);
-  swfdec_as_context_run (object->context);
+  sec = swfdec_security_allow_new ();
+  swfdec_as_object_call_with_security (object, sec, name, argc, argv, return_value);
+  g_object_unref (sec);
 }
 
 /**
diff --git a/libswfdec/swfdec_movie.c b/libswfdec/swfdec_movie.c
index 3f91015..f3b1ee9 100644
--- a/libswfdec/swfdec_movie.c
+++ b/libswfdec/swfdec_movie.c
@@ -391,8 +391,10 @@ swfdec_movie_execute_script (SwfdecMovie *movie, SwfdecEventType condition)
 	SWFDEC_SECURITY (movie->resource), condition, 0);
   }
   name = swfdec_event_type_get_name (condition);
-  if (name != NULL)
-    swfdec_as_object_call (SWFDEC_AS_OBJECT (movie), name, 0, NULL, NULL);
+  if (name != NULL) {
+    swfdec_as_object_call_with_security (SWFDEC_AS_OBJECT (movie), 
+	SWFDEC_SECURITY (movie->resource), name, 0, NULL, NULL);
+  }
 }
 
 static void
commit efe1e7136f57dde9f2e73c9dbea101c6849eed3e
Author: Benjamin Otte <otte at gnome.org>
Date:   Tue Oct 23 14:46:48 2007 +0200

    remove the concept of "merging" securities. It didn't make a lot of sense anyway.

diff --git a/libswfdec/swfdec_as_frame.c b/libswfdec/swfdec_as_frame.c
index 5582f2b..841f438 100644
--- a/libswfdec/swfdec_as_frame.c
+++ b/libswfdec/swfdec_as_frame.c
@@ -860,26 +860,19 @@ swfdec_as_frame_get_this (SwfdecAsFrame *frame)
 /**
  * swfdec_as_frame_set_security:
  * @frame: the frame to be executed
- * @guard: the security guarding this frame
+ * @guard: the security to be used in this frame
  *
- * Checks that @guard allows executing the frame. The frame's security will
- * be set to what @guard returns. By default, a frame has the security of
- * its parent frame. If it's the first frame, it's allowed everything.
+ * Sets the security to be used in this frame to @guard.
  **/
 void
 swfdec_as_frame_set_security (SwfdecAsFrame *frame, SwfdecSecurity *guard)
 {
-  SwfdecSecurity *old;
-
   g_return_if_fail (SWFDEC_IS_AS_FRAME (frame));
   g_return_if_fail (SWFDEC_IS_SECURITY (guard));
 
-  /* execution is not allowed anyway */
-  if (frame->security == NULL)
-    return;
+  if (frame->security)
+    g_object_unref (frame->security);
 
-  old = frame->security;
-  frame->security = swfdec_security_allow (guard, old);
-  g_object_unref (old);
+  frame->security = g_object_ref (guard);
 }
 
diff --git a/libswfdec/swfdec_flash_security.c b/libswfdec/swfdec_flash_security.c
index 0acf747..70cb7cf 100644
--- a/libswfdec/swfdec_flash_security.c
+++ b/libswfdec/swfdec_flash_security.c
@@ -29,20 +29,20 @@
 
 G_DEFINE_TYPE (SwfdecFlashSecurity, swfdec_flash_security, SWFDEC_TYPE_SECURITY)
 
-static SwfdecSecurity *
+static gboolean
 swfdec_flash_security_allow (SwfdecSecurity *guard, SwfdecSecurity *key)
 {
   if (guard == key) {
-    return g_object_ref (guard);
+    return TRUE;
   } else if (SWFDEC_IS_SECURITY_ALLOW (key)) {
     /* This only happens when calling functions (I hope) */
-    return g_object_ref (guard);
+    return TRUE;
   } else if (SWFDEC_IS_FLASH_SECURITY (key)) {
-    /* FIXME: what do we do here? */
-    return g_object_ref (key);
+    SWFDEC_FIXME ("implement security checking");
+    return TRUE;
   } else {
     SWFDEC_ERROR ("unknown security %s, denying access", G_OBJECT_TYPE_NAME (key));
-    return NULL;
+    return FALSE;
   }
 }
 
diff --git a/libswfdec/swfdec_security.c b/libswfdec/swfdec_security.c
index dfd66b3..faffd9b 100644
--- a/libswfdec/swfdec_security.c
+++ b/libswfdec/swfdec_security.c
@@ -46,20 +46,18 @@ swfdec_security_init (SwfdecSecurity *security)
  * Asks @guard to check if the given @key allows accessing it. If so, a
  * key for accessing the operation is returned.
  *
- * Returns: %NULL if access was not granted, otherwise the new security 
- *          priviliges for accessing the operation. Use g_object_unref() after
- *          use.
+ * Returns: %TRUE if access was granted, %FALSE otherwise.
  **/
-SwfdecSecurity *
+gboolean
 swfdec_security_allow (SwfdecSecurity *guard, SwfdecSecurity *key)
 {
   SwfdecSecurityClass *klass;
 
-  g_return_val_if_fail (SWFDEC_IS_SECURITY (guard), NULL);
-  g_return_val_if_fail (SWFDEC_IS_SECURITY (key), NULL);
+  g_return_val_if_fail (SWFDEC_IS_SECURITY (guard), FALSE);
+  g_return_val_if_fail (SWFDEC_IS_SECURITY (key), FALSE);
 
   klass = SWFDEC_SECURITY_GET_CLASS (guard);
-  g_return_val_if_fail (klass->allow, NULL);
+  g_return_val_if_fail (klass->allow, FALSE);
   return klass->allow (guard, key);
 }
 
diff --git a/libswfdec/swfdec_security.h b/libswfdec/swfdec_security.h
index 1bfaf3f..6c03530 100644
--- a/libswfdec/swfdec_security.h
+++ b/libswfdec/swfdec_security.h
@@ -44,7 +44,7 @@ struct _SwfdecSecurityClass
 {
   GObjectClass		object_class;
 
-  SwfdecSecurity *	(* allow)			(SwfdecSecurity *	guard,
+  gboolean		(* allow)			(SwfdecSecurity *	guard,
 							 SwfdecSecurity *	from);
   gboolean		(* allow_url)			(SwfdecSecurity *	guard,
 							 const SwfdecURL *	url);
@@ -52,7 +52,7 @@ struct _SwfdecSecurityClass
 
 GType			swfdec_security_get_type	(void);
 
-SwfdecSecurity *	swfdec_security_allow		(SwfdecSecurity *	guard,
+gboolean		swfdec_security_allow		(SwfdecSecurity *	guard,
 							 SwfdecSecurity *	key);
 gboolean		swfdec_security_allow_url	(SwfdecSecurity *	guard,
 							 const SwfdecURL *	url);
diff --git a/libswfdec/swfdec_security_allow.c b/libswfdec/swfdec_security_allow.c
index 98d915e..87730fc 100644
--- a/libswfdec/swfdec_security_allow.c
+++ b/libswfdec/swfdec_security_allow.c
@@ -28,10 +28,10 @@
 
 G_DEFINE_TYPE (SwfdecSecurityAllow, swfdec_security_allow, SWFDEC_TYPE_SECURITY)
 
-static SwfdecSecurity *
+static gboolean
 swfdec_security_allow_allow (SwfdecSecurity *guard, SwfdecSecurity *key)
 {
-  return g_object_ref (key);
+  return TRUE;
 }
 
 static gboolean
commit 7ba31f63923ef396e92da50eb4935cba9f91d472
Author: Benjamin Otte <otte at gnome.org>
Date:   Mon Oct 22 20:18:17 2007 +0200

    update tag list

diff --git a/libswfdec/swfdec_tag.c b/libswfdec/swfdec_tag.c
index bad0be3..61827e7 100644
--- a/libswfdec/swfdec_tag.c
+++ b/libswfdec/swfdec_tag.c
@@ -655,7 +655,7 @@ static struct tag_func_struct tag_funcs[] = {
   [SWFDEC_TAG_DEFINEBUTTON] = {"DefineButton", tag_func_define_button, 0},
   [SWFDEC_TAG_JPEGTABLES] = {"JPEGTables", swfdec_image_jpegtables, 0},
   [SWFDEC_TAG_SETBACKGROUNDCOLOR] =
-      {"SetBackgroundColor", tag_func_set_background_color, 0},
+      {"SetBackgroundColor", tag_func_set_background_color, SWFDEC_TAG_DEFINE_SPRITE },
   [SWFDEC_TAG_DEFINEFONT] = {"DefineFont", tag_func_define_font, 0},
   [SWFDEC_TAG_DEFINETEXT] = {"DefineText", tag_func_define_text, 0},
   [SWFDEC_TAG_DOACTION] = {"DoAction", tag_func_do_action, SWFDEC_TAG_DEFINE_SPRITE },
@@ -701,22 +701,27 @@ static struct tag_func_struct tag_funcs[] = {
   [SWFDEC_TAG_DEFINEVIDEOSTREAM] = {"DefineVideoStream", tag_func_define_video, 0},
   [SWFDEC_TAG_VIDEOFRAME] = {"VideoFrame", tag_func_video_frame, SWFDEC_TAG_DEFINE_SPRITE },
   [SWFDEC_TAG_DEFINEFONTINFO2] = {"DefineFontInfo2", tag_func_define_font_info, 0},
-  [SWFDEC_TAG_MX4] = {"MX4", NULL, 0},
+  [SWFDEC_TAG_DEBUGID] = {"DebugID", NULL, 0},
   [SWFDEC_TAG_ENABLEDEBUGGER2] = {"EnableDebugger2", NULL, 0},
   [SWFDEC_TAG_SCRIPTLIMITS] = {"ScriptLimits", NULL, 0},
-  [SWFDEC_TAG_SETTABINDEX] = {"SetTabIndex", NULL, 0},
+  [SWFDEC_TAG_SETTABINDEX] = {"SetTabIndex", NULL, SWFDEC_TAG_DEFINE_SPRITE },
   [SWFDEC_TAG_FILEATTRIBUTES] = {"FileAttributes", tag_func_file_attributes, SWFDEC_TAG_FIRST_ONLY },
   [SWFDEC_TAG_PLACEOBJECT3] = {"PlaceObject3", tag_func_enqueue, SWFDEC_TAG_DEFINE_SPRITE },
   [SWFDEC_TAG_IMPORTASSETS2] = {"ImportAssets2", NULL, 0},
   [SWFDEC_TAG_DEFINEFONTALIGNZONES] = {"DefineFontAlignZones", NULL, 0},
   [SWFDEC_TAG_CSMTEXTSETTINGS] = {"CSMTextSettings", NULL, 0},
   [SWFDEC_TAG_DEFINEFONT3] = {"DefineFont3", tag_func_define_font_3, 0},
-  [SWFDEC_TAG_AVM2DECL] = {"AVM2Decl", NULL, 0},
+  [SWFDEC_TAG_AVM2DECL] = {"AVM2Decl", NULL, SWFDEC_TAG_DEFINE_SPRITE },
   [SWFDEC_TAG_METADATA] = {"Metadata", NULL, 0},
   [SWFDEC_TAG_DEFINESCALINGGRID] = {"DefineScalingGrid", NULL, 0},
-  [SWFDEC_TAG_AVM2ACTION] = {"AVM2Action", NULL, 0},
+  [SWFDEC_TAG_AVM2ACTION] = {"AVM2Action", NULL, SWFDEC_TAG_DEFINE_SPRITE },
   [SWFDEC_TAG_DEFINESHAPE4] = {"DefineShape4", tag_define_shape_4, 0},
   [SWFDEC_TAG_DEFINEMORPHSHAPE2] = {"DefineMorphShape2", NULL, 0},
+  [SWFDEC_TAG_PRIVATE_IMAGE] = { "PrivateImage", NULL, 0},
+  [SWFDEC_TAG_DEFINESCENEDATA] = { "DefineSceneData", NULL, 0},
+  [SWFDEC_TAG_DEFINEBINARYDATA] = { "DefineBinaryData", NULL, 0},
+  [SWFDEC_TAG_DEFINEFONTNAME] = { "DefineFontName", NULL, 0},
+  [SWFDEC_TAG_STARTSOUND2] = {"StartSound2", NULL, SWFDEC_TAG_DEFINE_SPRITE }
 };
 
 static const int n_tag_funcs = sizeof (tag_funcs) / sizeof (tag_funcs[0]);
diff --git a/libswfdec/swfdec_tag.h b/libswfdec/swfdec_tag.h
index a3df92b..cee23ce 100644
--- a/libswfdec/swfdec_tag.h
+++ b/libswfdec/swfdec_tag.h
@@ -74,22 +74,41 @@ typedef enum {
   SWFDEC_TAG_DEFINEVIDEOSTREAM	  = 60,
   SWFDEC_TAG_VIDEOFRAME		  = 61,
   SWFDEC_TAG_DEFINEFONTINFO2	  = 62,
-  SWFDEC_TAG_MX4		  = 63,     /*(?) */
+  SWFDEC_TAG_DEBUGID		  = 63,
   SWFDEC_TAG_ENABLEDEBUGGER2	  = 64,
   SWFDEC_TAG_SCRIPTLIMITS	  = 65,
   SWFDEC_TAG_SETTABINDEX	  = 66,
+#if 0
+  /* magic tags that seem to be similar to FILEATTRIBUTES */
+  SWFDEC_TAG_			  = 67,
+  SWFDEC_TAG_			  = 68,
+#endif
   SWFDEC_TAG_FILEATTRIBUTES	  = 69,
   SWFDEC_TAG_PLACEOBJECT3	  = 70,
   SWFDEC_TAG_IMPORTASSETS2	  = 71,
+#if 0
+  /* seems similar to SWFDEC_TAG_AVM2DECL */
+  SWFDEC_TAG_			  = 72, /* allowed with DefineSprite */
+#endif
   SWFDEC_TAG_DEFINEFONTALIGNZONES = 73,
   SWFDEC_TAG_CSMTEXTSETTINGS	  = 74,
   SWFDEC_TAG_DEFINEFONT3	  = 75,
   SWFDEC_TAG_AVM2DECL		  = 76,
   SWFDEC_TAG_METADATA		  = 77,
   SWFDEC_TAG_DEFINESCALINGGRID	  = 78,
+#if 0
+  /* more magic tags that seem to be similar to FILEATTRIBUTES */
+  SWFDEC_TAG_			  = 80,
+  SWFDEC_TAG_			  = 81,
+#endif
   SWFDEC_TAG_AVM2ACTION		  = 82,
   SWFDEC_TAG_DEFINESHAPE4	  = 83,
-  SWFDEC_TAG_DEFINEMORPHSHAPE2    = 84
+  SWFDEC_TAG_DEFINEMORPHSHAPE2    = 84,
+  SWFDEC_TAG_PRIVATE_IMAGE    	  = 85,
+  SWFDEC_TAG_DEFINESCENEDATA  	  = 86,
+  SWFDEC_TAG_DEFINEBINARYDATA 	  = 87,
+  SWFDEC_TAG_DEFINEFONTNAME	  = 88,
+  SWFDEC_TAG_STARTSOUND2	  = 89
 } SwfdecTag;
 
 typedef enum {
commit 0e89b6f88661a503ab50aee90461d669239284de
Author: Benjamin Otte <otte at gnome.org>
Date:   Mon Oct 22 19:00:25 2007 +0200

    add missing actions to action list

diff --git a/libswfdec/swfdec_as_interpret.c b/libswfdec/swfdec_as_interpret.c
index 4f8130c..823e161 100644
--- a/libswfdec/swfdec_as_interpret.c
+++ b/libswfdec/swfdec_as_interpret.c
@@ -2864,6 +2864,7 @@ const SwfdecActionSpec swfdec_as_actions[256] = {
   /* version 6 */
   [SWFDEC_AS_ACTION_INSTANCE_OF] = { "InstanceOf", NULL },
   [SWFDEC_AS_ACTION_ENUMERATE2] = { "Enumerate2", NULL, 1, -1, { NULL, NULL, NULL, swfdec_action_enumerate2, swfdec_action_enumerate2 } },
+  [SWFDEC_AS_ACTION_BREAKPOINT] = { "Breakpoint", NULL, },
   /* version 5 */
   [SWFDEC_AS_ACTION_BIT_AND] = { "BitAnd", NULL, 2, 1, { NULL, NULL, swfdec_action_bitwise, swfdec_action_bitwise, swfdec_action_bitwise } },
   [SWFDEC_AS_ACTION_BIT_OR] = { "BitOr", NULL, 2, 1, { NULL, NULL, swfdec_action_bitwise, swfdec_action_bitwise, swfdec_action_bitwise } },
@@ -2884,6 +2885,7 @@ const SwfdecActionSpec swfdec_as_actions[256] = {
   [SWFDEC_AS_ACTION_STORE_REGISTER] = { "StoreRegister", swfdec_action_print_store_register, 1, 1, { NULL, NULL, swfdec_action_store_register, swfdec_action_store_register, swfdec_action_store_register } },
   [SWFDEC_AS_ACTION_CONSTANT_POOL] = { "ConstantPool", swfdec_action_print_constant_pool, 0, 0, { NULL, NULL, swfdec_action_constant_pool, swfdec_action_constant_pool, swfdec_action_constant_pool } },
   /* version 3 */
+  [SWFDEC_AS_ACTION_STRICT_MODE] = { "StrictMode", NULL, },
   [SWFDEC_AS_ACTION_WAIT_FOR_FRAME] = { "WaitForFrame", swfdec_action_print_wait_for_frame, 0, 0, { swfdec_action_wait_for_frame, swfdec_action_wait_for_frame, swfdec_action_wait_for_frame, swfdec_action_wait_for_frame, swfdec_action_wait_for_frame } },
   [SWFDEC_AS_ACTION_SET_TARGET] = { "SetTarget", swfdec_action_print_set_target, 0, 0, { swfdec_action_set_target, swfdec_action_set_target, swfdec_action_set_target, swfdec_action_set_target, swfdec_action_set_target } },
   [SWFDEC_AS_ACTION_GOTO_LABEL] = { "GotoLabel", swfdec_action_print_goto_label, 0, 0, { swfdec_action_goto_label, swfdec_action_goto_label, swfdec_action_goto_label, swfdec_action_goto_label, swfdec_action_goto_label } },
diff --git a/libswfdec/swfdec_as_interpret.h b/libswfdec/swfdec_as_interpret.h
index 44f1425..37689eb 100644
--- a/libswfdec/swfdec_as_interpret.h
+++ b/libswfdec/swfdec_as_interpret.h
@@ -114,6 +114,7 @@ typedef enum {
   SWFDEC_AS_ACTION_NEW_METHOD = 0x53,
   SWFDEC_AS_ACTION_INSTANCE_OF = 0x54,
   SWFDEC_AS_ACTION_ENUMERATE2 = 0x55,
+  SWFDEC_AS_ACTION_BREAKPOINT = 0x5F,
   SWFDEC_AS_ACTION_BIT_AND = 0x60,
   SWFDEC_AS_ACTION_BIT_OR = 0x61,
   SWFDEC_AS_ACTION_BIT_XOR = 0x62,
@@ -128,6 +129,7 @@ typedef enum {
   SWFDEC_AS_ACTION_GET_URL = 0x83,
   SWFDEC_AS_ACTION_STORE_REGISTER = 0x87,
   SWFDEC_AS_ACTION_CONSTANT_POOL = 0x88,
+  SWFDEC_AS_ACTION_STRICT_MODE = 0x89,
   SWFDEC_AS_ACTION_WAIT_FOR_FRAME = 0x8A,
   SWFDEC_AS_ACTION_SET_TARGET = 0x8B,
   SWFDEC_AS_ACTION_GOTO_LABEL = 0x8C,
commit e428af98bea20fccf08e87bc10ce2af34801cc87
Author: Benjamin Otte <otte at gnome.org>
Date:   Mon Oct 22 17:10:24 2007 +0200

    fix memleak
    
    Thanks Valgrind

diff --git a/libswfdec/swfdec_as_script_function.c b/libswfdec/swfdec_as_script_function.c
index dc10056..c696305 100644
--- a/libswfdec/swfdec_as_script_function.c
+++ b/libswfdec/swfdec_as_script_function.c
@@ -56,6 +56,8 @@ swfdec_as_script_function_dispose (GObject *object)
     swfdec_script_unref (script->script);
     script->script = NULL;
   }
+  g_slist_free (script->scope_chain);
+  script->scope_chain = NULL;
 
   G_OBJECT_CLASS (swfdec_as_script_function_parent_class)->dispose (object);
 }


More information about the Swfdec mailing list