search for: guint8

Displaying 20 results from an estimated 150 matches for "guint8".

Did you mean: uint8
2007 Apr 04
0
Branch 'as' - 4 commits - libswfdec/Makefile.am libswfdec/swfdec_as_context.c libswfdec/swfdec_as_frame.c libswfdec/swfdec_as_interpret.c libswfdec/swfdec_as_interpret.h libswfdec/swfdec_as_object.c libswfdec/swfdec_as_types.c libswfdec/swfdec_as_types.h
...nes minimum and maximum versions for which we have seperate scripts */ -#define MINSCRIPTVERSION 3 -#define MAXSCRIPTVERSION 7 -#define EXTRACT_VERSION(v) MIN ((v) - MINSCRIPTVERSION, MAXSCRIPTVERSION - MINSCRIPTVERSION) - -typedef void (* SwfdecActionExec) (SwfdecAsContext *cx, guint action, const guint8 *data, guint len); -typedef struct { - const char * name; /* name identifying the action */ - char * (* print) (guint action, const guint8 *data, guint len); - int remove; /* values removed from stack or -1 for dynamic */ - int add; /* values added to the stack or -1 for dynamic */ -...
2008 Jun 02
4
[Bug 16206] New: Charts in Yahoo Finance crash swfdec
http://bugs.freedesktop.org/show_bug.cgi?id=16206 Summary: Charts in Yahoo Finance crash swfdec Product: swfdec Version: git Platform: Other URL: http://finance.yahoo.com/echarts?s=%5EDJI#symbol=%5EDJI; range=1d OS/Version: All Status: NEW Severity: critical Priority: medium
2007 Feb 01
0
Branch 'interpreter' - libswfdec/swfdec_script.c
...+ frame = swfdec_sprite_get_frame (SWFDEC_SPRITE_MOVIE (movie)->sprite, name); + } else { + /* FIXME: how do we treat undefined etc? */ + frame = swfdec_action_to_number (cx, val); + } + return frame; +} + static JSBool swfdec_action_goto_frame2 (JSContext *cx, guint action, const guint8 *data, guint len) { @@ -274,7 +295,6 @@ swfdec_action_goto_frame2 (JSContext *cx guint bias; gboolean play; jsval val; - int frame; SwfdecMovie *movie; swfdec_bits_init_data (&bits, data, len); @@ -288,24 +308,13 @@ swfdec_action_goto_frame2 (JSContext *cx } val = cx-&g...
2007 Dec 10
0
5 commits - libswfdec/jpeg libswfdec/swfdec_as_interpret.c libswfdec/swfdec_bits.c libswfdec/swfdec_cached.c libswfdec/swfdec_codec_adpcm.c libswfdec/swfdec_codec_audio.c libswfdec/swfdec_flash_security.c libswfdec/swfdec_image.c
...dec/swfdec_cached.c index e49d42a..4279d1e 100644 --- a/libswfdec/swfdec_cached.c +++ b/libswfdec/swfdec_cached.c @@ -72,7 +72,7 @@ swfdec_cached_set_cache (SwfdecCached *cached, SwfdecCache *cache) static void swfdec_cached_unload_func (gpointer data) { - SwfdecCached *cached = SWFDEC_CACHED ((guint8 *) data - G_STRUCT_OFFSET (SwfdecCached, handle)); + SwfdecCached *cached = SWFDEC_CACHED ((void *) ((guint8 *) data - G_STRUCT_OFFSET (SwfdecCached, handle))); cached->handle.unload = NULL; swfdec_cached_unload (cached); diff --git a/libswfdec/swfdec_codec_adpcm.c b/libswfdec/swfdec_co...
2007 Oct 28
0
4 commits - libswfdec-gtk/swfdec_gtk_loader.c libswfdec/swfdec_as_context.c libswfdec/swfdec_as_frame.c libswfdec/swfdec_as_frame_internal.h libswfdec/swfdec_as_interpret.c libswfdec/swfdec_loader.c libswfdec/swfdec_loader.h libswfdec/swfdec_load_object.c
...low 0 as the size of a loader diff --git a/libswfdec/swfdec_as_interpret.c b/libswfdec/swfdec_as_interpret.c index 3defeca..7125e05 100644 --- a/libswfdec/swfdec_as_interpret.c +++ b/libswfdec/swfdec_as_interpret.c @@ -2542,7 +2542,6 @@ swfdec_action_throw (SwfdecAsContext *cx, guint action, const guint8 *data, } typedef struct { - int ref_count; const guint8 * catch_start; const guint8 * finally_start; guint catch_size; @@ -2556,25 +2555,12 @@ typedef struct { } TryData; static void -swfdec_action_try_data_ref (gpointer data) +swfdec_action_try_data_free (gpointer data) {...
2007 Jan 18
0
Branch 'interpreter' - 4 commits - libswfdec/js libswfdec/swfdec_bits.c libswfdec/swfdec_bits.h libswfdec/swfdec_codec_screen.c libswfdec/swfdec_image.c libswfdec/swfdec_script.c libswfdec/swfdec_swf_decoder.c libswfdec/swfdec_tag.c
..._js.h" #include "swfdec_movie.h" #include "swfdec_root_movie.h" @@ -305,6 +306,18 @@ swfdec_action_push (JSContext *cx, guint return swfdec_bits_left (&bits) ? JS_TRUE : JS_FALSE; } +static JSBool +swfdec_action_get_variable (JSContext *cx, guint action, const guint8 *data, guint len) +{ + const char *s; + + s = swfdec_js_to_string (cx, cx->fp->sp[-1]); + if (s == NULL) + return JS_FALSE; + cx->fp->sp[-1] = swfdec_js_eval (cx, cx->fp->scopeChain, s); + return JS_TRUE; +} + /*** PRINT FUNCTIONS ***/ static char * @@ -352,6 +365,7 @@...
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
..._get_String_with_version() to it diff --git a/libswfdec/swfdec_as_interpret.c b/libswfdec/swfdec_as_interpret.c index b703847..130d920 100644 --- a/libswfdec/swfdec_as_interpret.c +++ b/libswfdec/swfdec_as_interpret.c @@ -326,7 +326,7 @@ swfdec_action_push (SwfdecAsContext *cx, guint action, const guint8 *data, guint switch (type) { case 0: /* string */ { - char *s = swfdec_bits_get_string_with_version (&bits, cx->version); + char *s = swfdec_bits_get_string (&bits, cx->version); if (s == NULL) return; SWFDEC_AS_VALUE_SET_STRING (swfdec_as_stack_push (c...
2007 Feb 16
0
11 commits - libswfdec/swfdec_font.c libswfdec/swfdec_font.h libswfdec/swfdec_js_movie.c libswfdec/swfdec_script.c libswfdec/swfdec_script.h test/.gitignore test/trace
...a/libswfdec/swfdec_script.c b/libswfdec/swfdec_script.c index dc8b2a5..95a5561 100644 --- a/libswfdec/swfdec_script.c +++ b/libswfdec/swfdec_script.c @@ -1418,7 +1418,8 @@ swfdec_action_init_object (JSContext *cx } static JSBool -swfdec_action_define_function (JSContext *cx, guint action, const guint8 *data, guint len) +swfdec_action_do_define_function (JSContext *cx, guint action, + const guint8 *data, guint len, gboolean v2) { const char *function_name; guint i, n_args, size; @@ -1426,7 +1427,8 @@ swfdec_action_define_function (JSContext JSFunction *fun; SwfdecScript *script;...
2007 Apr 04
0
Branch 'as' - 9 commits - libswfdec/swfdec_as_context.c libswfdec/swfdec_as_frame.c libswfdec/swfdec_as_frame.h libswfdec/swfdec_as_function.c libswfdec/swfdec_as_interpret.c libswfdec/swfdec_as_stack.c libswfdec/swfdec_as_stack.h
...ibswfdec/swfdec_as_interpret.c index 60c4046..aab5f44 100644 --- a/libswfdec/swfdec_as_interpret.c +++ b/libswfdec/swfdec_as_interpret.c @@ -512,22 +512,18 @@ swfdec_action_push (SwfdecAsContext *cx, } } -#if 0 static void swfdec_action_get_variable (SwfdecAsContext *cx, guint action, const guint8 *data, guint len) { const char *s; - s = swfdec_js_to_string (cx, cx->fp->sp[-1]); - if (s == NULL) - return JS_FALSE; - cx->fp->sp[-1] = swfdec_js_eval (cx, NULL, s); + s = swfdec_as_value_to_string (cx, swfdec_as_stack_peek (cx->frame->stack, 1)); + swfdec_as_conte...
2007 Apr 11
0
Branch 'as' - 4 commits - libswfdec/swfdec_as_interpret.c libswfdec/swfdec_as_types.c libswfdec/swfdec_as_types.h
...89186 100644 --- a/libswfdec/swfdec_as_interpret.c +++ b/libswfdec/swfdec_as_interpret.c @@ -1831,41 +1831,24 @@ swfdec_action_enumerate2 (SwfdecAsContex JS_DestroyIdArray (cx, array); return JS_TRUE; } +#endif static void -swfdec_action_logical_5 (SwfdecAsContext *cx, guint action, const guint8 *data, guint len) -{ - void l, r; - - l = swfdec_value_to_boolean_5 (cx, cx->fp->sp[-1]); - r = swfdec_value_to_boolean_5 (cx, cx->fp->sp[-2]); - - cx->fp->sp--; - if (action == 0x10) - cx->fp->sp[-1] = l && r ? JSVAL_TRUE : JSVAL_FALSE; - else - cx->f...
2007 Jan 18
0
Branch 'interpreter' - 2 commits - libswfdec/js libswfdec/swfdec_js_movie.c libswfdec/swfdec_script.c
...91 @@ swfdec_action_stop (JSContext *cx, guint SwfdecMovie *movie = swfdec_action_get_target (cx); if (movie) movie->stopped = TRUE; + else + SWFDEC_ERROR ("no movie to stop"); return JS_TRUE; } +static JSBool +swfdec_action_play (JSContext *cx, guint action, const guint8 *data, guint len) +{ + SwfdecMovie *movie = swfdec_action_get_target (cx); + if (movie) + movie->stopped = FALSE; + else + SWFDEC_ERROR ("no movie to play"); + return JS_TRUE; +} + +static JSBool +swfdec_action_goto_frame (JSContext *cx, guint action, const guint8 *data, guin...
2007 Oct 26
0
3 commits - libswfdec/swfdec_as_context.c libswfdec/swfdec_as_context.h libswfdec/swfdec_as_interpret.c
..._as_frame_check_block (frame); diff --git a/libswfdec/swfdec_as_interpret.c b/libswfdec/swfdec_as_interpret.c index 3ab6fc0..cf41ff0 100644 --- a/libswfdec/swfdec_as_interpret.c +++ b/libswfdec/swfdec_as_interpret.c @@ -2543,6 +2543,7 @@ swfdec_action_throw (SwfdecAsContext *cx, guint action, const guint8 *data, } typedef struct { + int ref_count; const guint8 * start; gboolean catch; gboolean finally; @@ -2557,10 +2558,25 @@ typedef struct { } TryData; static void -swfdec_action_try_free_data (TryData *try_data) +swfdec_action_try_data_ref (gpointer data) { + TryData *try_da...
2007 Mar 13
0
2 commits - libswfdec/swfdec_debugger.c libswfdec/swfdec_script.c libswfdec/swfdec_script.h
...@@ -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)) { + guint type = swfdec_bits_get_u8 (&bits); + if (first) + g_string_app...
2007 Nov 07
0
14 commits - libswfdec/swfdec_as_context.c libswfdec/swfdec_as_interpret.c libswfdec/swfdec_as_interpret.h libswfdec/swfdec_net_stream.c libswfdec/swfdec_script.c libswfdec/swfdec_sprite_movie.c libswfdec/swfdec_tag.c libswfdec/swfdec_text_field_movie.c
...pt.c index b34aba7..2dd36be 100644 --- a/libswfdec/swfdec_script.c +++ b/libswfdec/swfdec_script.c @@ -168,6 +168,13 @@ swfdec_script_foreach_internal (SwfdecBits *bits, SwfdecScriptForeachFunc func, return TRUE; } +static gboolean +validate_action (gconstpointer bytecode, guint action, const guint8 *data, guint len, gpointer scriptp) +{ + // TODO: get rid of this function + return TRUE; +} + /*** PUBLIC API ***/ gboolean @@ -230,9 +237,16 @@ swfdec_script_new_from_bits (SwfdecBits *bits, const char *name, guint version) * DefineFunction and friends override this */ script->fla...
2007 Jan 29
0
Branch 'interpreter' - 18 commits - libswfdec/swfdec_image.c libswfdec/swfdec_image.h libswfdec/swfdec_js.c libswfdec/swfdec_js_color.c libswfdec/swfdec_js_sound.c libswfdec/swfdec_pattern.c libswfdec/swfdec_scriptable.c libswfdec/swfdec_script.c
...ss now diff --git a/libswfdec/swfdec_script.c b/libswfdec/swfdec_script.c index b1f1a63..64f0746 100644 --- a/libswfdec/swfdec_script.c +++ b/libswfdec/swfdec_script.c @@ -1105,6 +1105,35 @@ fail: return JS_TRUE; } +static JSBool +swfdec_action_init_object (JSContext *cx, guint action, const guint8 *data, guint len) +{ + JSStackFrame *fp = cx->fp; + JSObject *object; + guint i, n_args; + + if (!JS_ValueToECMAUint32 (cx, fp->sp[-1], &n_args)) + return JS_FALSE; + if ((guint) (fp->sp - fp->spbase) < 2 * n_args + 1) { + SWFDEC_ERROR ("not enough stack space&quo...
2007 Jan 31
0
Branch 'interpreter' - 3 commits - libswfdec/js libswfdec/swfdec_script.c
...--git a/libswfdec/swfdec_script.c b/libswfdec/swfdec_script.c index 9b3a328..46ba618 100644 --- a/libswfdec/swfdec_script.c +++ b/libswfdec/swfdec_script.c @@ -1359,6 +1359,35 @@ swfdec_action_define_function (JSContext } static JSBool +swfdec_action_bitwise (JSContext *cx, guint action, const guint8 *data, guint len) +{ + guint32 a, b; + double d; + + if (!JS_ValueToECMAUint32 (cx, cx->fp->sp[-1], &a) || + !JS_ValueToECMAUint32 (cx, cx->fp->sp[-2], &b)) + return JS_FALSE; + + switch (action) { + case 0x60: + d = (int) (a & b); + break; + case...
2007 Nov 10
1
3 commits - libswfdec/swfdec_image.c libswfdec/swfdec_image.h
...362d 100644 --- a/libswfdec/swfdec_image.c +++ b/libswfdec/swfdec_image.c @@ -558,10 +558,28 @@ swfdec_image_colormap_decode (SwfdecImage * image, } } +static cairo_status_t +swfdec_image_png_read (void *bitsp, unsigned char *data, unsigned int length) +{ + SwfdecBits *bits = bitsp; + const guint8 *ptr; + + ptr = bits->ptr; + if (swfdec_bits_skip_bytes (bits, length) != length) + return CAIRO_STATUS_READ_ERROR; + + memcpy (data, ptr, length); + return CAIRO_STATUS_SUCCESS; +} + static void swfdec_image_png_load (SwfdecImage *image) { - SWFDEC_ERROR ("implement loading PNG...
2008 Apr 12
2
[Bug 15471] New: segmentation fault while seeking in youtube.com
...tion *) 0xab80228 rval = {type = SWFDEC_AS_TYPE_UNDEFINED, value = {boolean = 0, number = 0, string = 0x0, object = 0x0}} frame = (SwfdecAsFrame *) 0xdce4670 last_frame = (SwfdecAsFrame *) 0x0 spec = (const SwfdecActionSpec *) 0xb230bd30 startpc = (const guint8 *) 0xb15cd08 "CWS\a?\206\001" pc = <value optimized out> endpc = (const guint8 *) 0xb1753de " ---Type <return> to continue, or q <return> to quit--- nextpc = (const guint8 *) 0xb170edc "\027\226\r" exitpc = (const guint8 *)...
2007 Feb 06
0
109 commits - configure.ac libswfdec/js libswfdec/Makefile.am libswfdec/swfdec_bits.c libswfdec/swfdec_bits.h libswfdec/swfdec_buffer.c libswfdec/swfdec_button_movie.c libswfdec/swfdec_codec_screen.c libswfdec/swfdec_color.c libswfdec/swfdec_color.h
...tomizeInt (state->cx, i, 0); - ale = js_IndexAtom (state->cx, atom, &state->atoms); - if (ale == NULL) { - compile_state_error (state, "Failed to add int %d", i); - return 0; - } - return ALE_INDEX (ale); -} - -#define ONELINER(state, opcode) G_STMT_START { \ - guint8 command = opcode; \ - compile_state_add_code (state, &command, 1); \ -} G_STMT_END -#define THREELINER(state, opcode, id1, id2) G_STMT_START { \ - guint8 command[3] = { opcode, id1, id2 }; \ - compile_state_add_code (state, command, 3); \ -} G_STMT_END -#define THREELINER_INT(state, opcode,...
2007 Sep 26
1
Youtube broken by 89d295a94
...ut it's just a hack. diff --git a/libswfdec/swfdec_as_interpret.c b/libswfdec/swfdec_as_interpret.c index 5dc9a24..e94b835 100644 --- a/libswfdec/swfdec_as_interpret.c +++ b/libswfdec/swfdec_as_interpret.c @@ -578,6 +578,7 @@ swfdec_action_get_variable (SwfdecAsContext *cx, guint action, const guint8 *dat val = swfdec_as_stack_peek (cx, 1); s = swfdec_as_value_to_string (cx, val); + swfdec_as_context_eval (cx, NULL, s, val); if (swfdec_action_get_movie_by_path (cx, s, &object, &s)) { if (object) { if (s) { @@ -589,7 +590,7 @@ swfdec_action_get_variable (SwfdecAsC...