CVSROOT: /sources/gnash Module name: gnash Changes by: Sandro Santilli <strk> 07/05/14 17:57:45
Modified files: . : ChangeLog server/parser : shape_character_def.cpp Log message: * backend/render_handler_agg_style.h (is_solid): check argument with an assertion before accessing the m_styles vector. * server/parser/shape_character_def.cpp (read): don't set line and fill styles to unavailable values. Drop a weird an likely bogus modification of tag_type when a flagHasNewStyle is set and the tag is DEFINESHAPE. CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.3204&r2=1.3205 http://cvs.savannah.gnu.org/viewcvs/gnash/server/parser/shape_character_def.cpp?cvsroot=gnash&r1=1.22&r2=1.23 Patches: Index: ChangeLog =================================================================== RCS file: /sources/gnash/gnash/ChangeLog,v retrieving revision 1.3204 retrieving revision 1.3205 diff -u -b -r1.3204 -r1.3205 --- ChangeLog 14 May 2007 17:26:05 -0000 1.3204 +++ ChangeLog 14 May 2007 17:57:45 -0000 1.3205 @@ -1,5 +1,14 @@ 2007-05-14 Sandro Santilli <[EMAIL PROTECTED]> + * backend/render_handler_agg_style.h (is_solid): check argument + with an assertion before accessing the m_styles vector. + * server/parser/shape_character_def.cpp (read): don't set line and + fill styles to unavailable values. Drop a weird an likely bogus + modification of tag_type when a flagHasNewStyle is set and the + tag is DEFINESHAPE. + +2007-05-14 Sandro Santilli <[EMAIL PROTECTED]> + * utilities/Makefile.am: don't set LDFLAGS twice. * server/parser/shape_character_def.{cpp,h}: add ShapeRecordFlags enum to use symbolic names while parsing. Don't change tag type Index: server/parser/shape_character_def.cpp =================================================================== RCS file: /sources/gnash/gnash/server/parser/shape_character_def.cpp,v retrieving revision 1.22 retrieving revision 1.23 diff -u -b -r1.22 -r1.23 --- server/parser/shape_character_def.cpp 14 May 2007 17:23:15 -0000 1.22 +++ server/parser/shape_character_def.cpp 14 May 2007 17:57:45 -0000 1.23 @@ -17,7 +17,7 @@ // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA // -/* $Id: shape_character_def.cpp,v 1.22 2007/05/14 17:23:15 strk Exp $ */ +/* $Id: shape_character_def.cpp,v 1.23 2007/05/14 17:57:45 strk Exp $ */ // Based on the public domain shape.cpp of Thatcher Ulrich <[EMAIL PROTECTED]> 2003 @@ -95,7 +95,6 @@ try { fs.read(in, tag_type, m); - styles.push_back(fs); } catch (ParserException& e) { @@ -103,6 +102,9 @@ log_swferror("%s", e.what()); ); } + // Push a style anyway, so any path referring to + // it still finds it.. + styles.push_back(fs); } } @@ -263,13 +265,21 @@ if (style > 0) { style += fill_base; } + if ( style < m_fill_styles.size() ) + { current_path.setLeftFill(style); - IF_VERBOSE_PARSE - ( + IF_VERBOSE_PARSE( if (SHAPE_LOG) { log_parse(_(" shape_character read: fill0 (left) = %d"), current_path.getLeftFill()); } + ) + } + else + { + IF_VERBOSE_MALFORMED_SWF( + log_swferror(_("Unknown fill style %d in fillStyle0Change record "), style); ); + } } if ((flags & flagFillStyle1Change) && num_fill_bits > 0) @@ -285,13 +295,22 @@ if (style > 0) { style += fill_base; } + if ( style < m_fill_styles.size() ) + { current_path.setRightFill(style); // getRightFill() = style; IF_VERBOSE_PARSE ( if (SHAPE_LOG) { log_parse(_(" shape_character read: fill1 (right) = %d"), current_path.getRightFill()); } + ) + } + else + { + IF_VERBOSE_MALFORMED_SWF( + log_swferror(_("Unknown fill style %d in fillStyle1Change record "), style); ); } + } if ((flags & flagLineStyleChange) && num_line_bits > 0) { // line_style_change = 1; @@ -305,22 +324,33 @@ if (style > 0) { style += line_base; } + if ( style < m_line_styles.size() ) + { current_path.setLineStyle(style); IF_VERBOSE_PARSE ( if (SHAPE_LOG) { log_parse(_(" shape_character_read: line = %d"), current_path.getLineStyle()); } + ) + } + else + { + IF_VERBOSE_MALFORMED_SWF( + log_swferror(_("Unknown line style %d in lienStyleChange record "), style); ); } + } if (flags & flagHasNewStyles) { - IF_VERBOSE_MALFORMED_SWF( if (tag_type == SWF::DEFINESHAPE) { + IF_VERBOSE_MALFORMED_SWF( log_swferror("unexpected HasNewStyle flag in a DEFINESHAPE tag shape record"); - } ) + // Used to be tag_type += SWF::DEFINESHAPE2, but + // I can't belive any such thing could be correct... + } IF_VERBOSE_PARSE ( log_parse(_(" shape_character read: more fill styles")); _______________________________________________ Gnash-commit mailing list Gnash-commit@gnu.org http://lists.gnu.org/mailman/listinfo/gnash-commit