While fixing robustness of the parser I found out that shape_character_def makes NO effort to ensure that used fill and line styles are defined.
I'm talking about the integer values attached to gnash::path objects, which supposedly refer to the shape_character_def m_fill_styles and m_line_styles record. I already raised a warning about this in the past, suggesting to store pointers to real fill styles in the gnash::path class, for consistency. Udo said it wasn't worth it, but can't remember why. What I know is that it's not only easy, but it's actually happening that the indexes end up referring to unexistend elements of the vectors. And sometime this results to security troubles (segfaults). When trying to ensure consistency, I found that the *inconsistency* is needed for glyphs. When parsing a DEFINEFONT or DEFINEFONT2 tag, we're going to read shape definitions that contain a left-fill offset of 1 (first element of the array), but we never create that array. Hackish handling of this is in the renderer classes, that create an ad-hoc style when dealing with glyphs. Unfortunately, discarding the fill and line style indexes in these cases (which is: whenever they refer to an unknown/unexistent element) breaks the rendering: glyhps are no more shown. So. Udo: any idea about fixing this ? --strk; () ASCII Ribbon Campaign /\ Keep it simple! _______________________________________________ Gnash-dev mailing list [email protected] http://lists.gnu.org/mailman/listinfo/gnash-dev

