Displaying 4 results from an estimated 4 matches for "wide_offset".
Did you mean:
wide_offsets
2007 Feb 15
0
8 commits - libswfdec/swfdec_bits.h libswfdec/swfdec_font.c libswfdec/swfdec_font.h libswfdec/swfdec_loader.c libswfdec/swfdec_loader_internal.h libswfdec/swfdec_tag.c libswfdec/swfdec_text.c libswfdec/swfdec_text.h test/swfedit_token.c test/various
...@@ -349,5 +351,92 @@ tag_func_define_font_2 (SwfdecSwfDecoder
int
tag_func_define_font_3 (SwfdecSwfDecoder * s)
{
+ SwfdecBits offsets, *bits = &s->b;
+ SwfdecFont *font;
+ SwfdecLanguage language;
+ guint i, id, len, n_glyphs, offset, next_offset;
+ gboolean layout, shift_jis, ansi, wide_offsets, wide_codes;
+
+ id = swfdec_bits_get_u16 (bits);
+ font = swfdec_swf_decoder_create_character (s, id, SWFDEC_TYPE_FONT);
+ if (!font)
+ return SWFDEC_STATUS_OK;
+ SWFDEC_LOG (" id = %u", id);
+ font->scale_factor = 20 * SWFDEC_TEXT_SCALE_FACTOR;
+
+ layout = swfdec_bits_get...
2007 Apr 17
0
15 commits - libswfdec/jpeg libswfdec/swfdec_bits.c libswfdec/swfdec_edittext.c libswfdec/swfdec_font.c libswfdec/swfdec_image.c libswfdec/swfdec_root_sprite.c libswfdec/swfdec_script.c libswfdec/swfdec_shape.c libswfdec/swfdec_sprite.c
...Decoder
int font_descent;
int font_leading;
int i;
+ guint skip;
id = swfdec_bits_get_u16 (bits);
font = swfdec_swf_decoder_create_character (s, id, SWFDEC_TYPE_FONT);
@@ -318,10 +319,18 @@ tag_func_define_font_2 (SwfdecSwfDecoder
n_glyphs = swfdec_bits_get_u16 (bits);
if (wide_offsets) {
- bits->ptr += 4 * n_glyphs;
+ skip = 4 * n_glyphs;
+ if (swfdec_bits_skip_bytes (bits, skip) != skip) {
+ SWFDEC_ERROR ("could not skip %u bytes", skip);
+ return SWFDEC_STATUS_OK;
+ }
code_table_offset = swfdec_bits_get_u32 (bits);
} else {
- bits...
2007 Apr 17
0
Branch 'as' - 17 commits - libswfdec/jpeg libswfdec/swfdec_bits.c libswfdec/swfdec_font.c libswfdec/swfdec_image.c libswfdec/swfdec_root_sprite.c libswfdec/swfdec_script.c libswfdec/swfdec_shape.c libswfdec/swfdec_sound.c libswfdec/swfdec_sprite.c
...Decoder
int font_descent;
int font_leading;
int i;
+ guint skip;
id = swfdec_bits_get_u16 (bits);
font = swfdec_swf_decoder_create_character (s, id, SWFDEC_TYPE_FONT);
@@ -318,10 +319,18 @@ tag_func_define_font_2 (SwfdecSwfDecoder
n_glyphs = swfdec_bits_get_u16 (bits);
if (wide_offsets) {
- bits->ptr += 4 * n_glyphs;
+ skip = 4 * n_glyphs;
+ if (swfdec_bits_skip_bytes (bits, skip) != skip) {
+ SWFDEC_ERROR ("could not skip %u bytes", skip);
+ return SWFDEC_STATUS_OK;
+ }
code_table_offset = swfdec_bits_get_u32 (bits);
} else {
- bits...
2007 Apr 22
0
3 commits - libswfdec/swfdec_bits.c libswfdec/swfdec_font.c libswfdec/swfdec_movie.c
...its_get_u16 (&offsets);
}
g_array_set_size (font->glyphs, n_glyphs);
- for (i = 0; i < n_glyphs; i++) {
+ for (i = 0; i < n_glyphs && swfdec_bits_left (&s->b); i++) {
SwfdecFontEntry *entry = &g_array_index (font->glyphs, SwfdecFontEntry, i);
if (wide_offsets)
next_offset = swfdec_bits_get_u32 (&offsets);
@@ -443,7 +449,12 @@ tag_func_define_font_3 (SwfdecSwfDecoder
swfdec_font_parse_shape (s, entry, next_offset - offset);
offset = next_offset;
}
- for (i = 0; i < n_glyphs; i++) {
+ if (i < n_glyphs) {
+ SWFDEC_ERROR...