Displaying 7 results from an estimated 7 matches for "scriptparser".
2007 Mar 13
0
2 commits - libswfdec/swfdec_debugger.c libswfdec/swfdec_script.c libswfdec/swfdec_script.h
...546d..c17c315 100644
--- a/libswfdec/swfdec_debugger.c
+++ b/libswfdec/swfdec_debugger.c
@@ -32,32 +32,138 @@
/*** SwfdecDebuggerScript ***/
+typedef struct {
+ SwfdecConstantPool * constant_pool; /* current constant pool */
+ GArray * commands; /* SwfdecDebuggerCommands parsed so far */
+} ScriptParser;
+
+static char *
+swfdec_debugger_print_push (ScriptParser *parser, const guint8 *data, guint len)
+{
+ gboolean first = TRUE;
+ SwfdecBits bits;
+ GString *string = g_string_new ("Push");
+
+ swfdec_bits_init_data (&bits, data, len);
+ while (swfdec_bits_left (&bits)) {
+...
2007 Jun 28
0
Branch 'as' - 4 commits - libswfdec/swfdec_debugger.c libswfdec/swfdec_movie.c libswfdec/swfdec_movie.h libswfdec/swfdec_sprite_movie.c test/image
...1:44:02 2007 +0200
check invalid constant pool indexes instead of crashing
diff --git a/libswfdec/swfdec_debugger.c b/libswfdec/swfdec_debugger.c
index 52ae539..141935b 100644
--- a/libswfdec/swfdec_debugger.c
+++ b/libswfdec/swfdec_debugger.c
@@ -111,11 +111,11 @@ swfdec_debugger_print_push (ScriptParser
goto error;
}
id = type == 8 ? swfdec_bits_get_u8 (&bits) : swfdec_bits_get_u16 (&bits);
- s = swfdec_constant_pool_get (parser->constant_pool, id);
- if (!s) {
+ if (id >= swfdec_constant_pool_size (parser->constant_pool)) {
SWFDEC_ERROR ("constant p...
2007 Apr 12
0
Branch 'as' - 15 commits - libswfdec/swfdec_as_context.c libswfdec/swfdec_as_context.h libswfdec/swfdec_as_frame.c libswfdec/swfdec_as_frame.h libswfdec/swfdec_as_function.c libswfdec/swfdec_as_function.h libswfdec/swfdec_as_interpret.c
...ure printing an action always returns a string, even if its just "error"
diff --git a/libswfdec/swfdec_debugger.c b/libswfdec/swfdec_debugger.c
index 71b3ee7..1daf62a 100644
--- a/libswfdec/swfdec_debugger.c
+++ b/libswfdec/swfdec_debugger.c
@@ -70,10 +70,8 @@ swfdec_debugger_print_push (ScriptParser
case 0: /* string */
{
const char *s = swfdec_bits_skip_string (&bits);
- if (!s) {
- g_string_free (string, TRUE);
- return NULL;
- }
+ if (!s)
+ goto error;
g_string_append_c (string, '"');
g_string_append (string, s);
g_string_append_c...
2007 Nov 22
0
5 commits - libswfdec/swfdec_as_interpret.c libswfdec/swfdec_bits.c libswfdec/swfdec_bits.h libswfdec/swfdec_debugger.c libswfdec/swfdec_movie.c libswfdec/swfdec_script.c libswfdec/swfdec_sprite_movie.c libswfdec/swfdec_tag.c libswfdec/swfdec_text_field.c
...wfdecBits * bits);
void swfdec_bits_get_rect (SwfdecBits * bits, SwfdecRect *rect);
diff --git a/libswfdec/swfdec_debugger.c b/libswfdec/swfdec_debugger.c
index 89adbf6..2dca1df 100644
--- a/libswfdec/swfdec_debugger.c
+++ b/libswfdec/swfdec_debugger.c
@@ -71,7 +71,7 @@ swfdec_debugger_print_push (ScriptParser *parser, const guint8 *data, guint len)
switch (type) {
case 0: /* string */
{
- char *s = swfdec_bits_get_string_with_version (&bits, parser->version);
+ char *s = swfdec_bits_get_string (&bits, parser->version);
if (!s)
goto error;
g_string_append_c (...
2007 Jun 06
0
Branch 'as' - 13 commits - libswfdec/swfdec_as_context.c libswfdec/swfdec_as_context.h libswfdec/swfdec_as_frame.c libswfdec/swfdec_as_frame.h libswfdec/swfdec_as_interpret.c libswfdec/swfdec_as_object.c libswfdec/swfdec_as_object.h
...r.c
@@ -47,6 +47,7 @@ static guint signals[LAST_SIGNAL] = { 0,
/*** SwfdecDebuggerScript ***/
typedef struct {
+ guint version; /* version of parsed file */
SwfdecConstantPool * constant_pool; /* current constant pool */
GArray * commands; /* SwfdecDebuggerCommands parsed so far */
} ScriptParser;
@@ -69,12 +70,13 @@ swfdec_debugger_print_push (ScriptParser
switch (type) {
case 0: /* string */
{
- const char *s = swfdec_bits_skip_string (&bits);
+ char *s = swfdec_bits_get_string_with_version (&bits, parser->version);
if (!s)
goto error;
g_string_a...
2007 Jul 18
0
12 commits - configure.ac doc/swfdec-sections.txt libswfdec-gtk/swfdec_playback_alsa.c libswfdec/jpeg libswfdec/Makefile.am libswfdec/swfdec_amf.c libswfdec/swfdec_as_array.c libswfdec/swfdec_as_boolean.h libswfdec/swfdec_as_context.c
...ot;
G_DEFINE_TYPE (SwfdecMovieColor, swfdec_movie_color, SWFDEC_TYPE_AS_OBJECT)
diff --git a/libswfdec/swfdec_debugger.c b/libswfdec/swfdec_debugger.c
index c7f9a35..d9c2798 100644
--- a/libswfdec/swfdec_debugger.c
+++ b/libswfdec/swfdec_debugger.c
@@ -131,7 +131,7 @@ swfdec_debugger_print_push (ScriptParser
error:
g_string_free (string, TRUE);
- return "erroneous action Push";
+ return g_strdup ("erroneous action Push");
}
/* NB: constant pool actions are special in that they are called at init time */
diff --git a/libswfdec/swfdec_flv_decoder.c b/libswfdec/swfdec_flv_d...
2007 Apr 04
0
Branch 'as' - 17 commits - configure.ac doc/Makefile.am doc/swfdec-docs.sgml doc/swfdec-sections.txt doc/swfdec.types libswfdec-gtk/Makefile.am libswfdec-gtk/swfdec-gtk.h libswfdec-gtk/swfdec_gtk_loader.c libswfdec-gtk/swfdec_gtk_loader.h
...;
-#include "swfdec_js.h"
#include "swfdec_movie.h"
#include "swfdec_player_internal.h"
-#include "js/jsdbgapi.h"
-#include "js/jsinterp.h" /* for frame->swf */
/*** SwfdecDebuggerScript ***/
@@ -112,7 +109,7 @@ swfdec_debugger_print_push (ScriptParser
break;
default:
SWFDEC_ERROR ("Push: type %u not implemented", type);
- return JS_FALSE;
+ return NULL;
}
}
return g_string_free (string, FALSE);
@@ -321,6 +318,7 @@ typedef struct {
guint line;
} Breakpoint;
+#if 0
static void
swfdec_debugger_do_breakpoin...