[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gnash-dev] shape_character_def fill/line styles

From: strk
Subject: [Gnash-dev] shape_character_def fill/line styles
Date: Mon, 14 May 2007 21:50:42 +0200

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 

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 
worth it, but can't remember why.

What I know is that it's not only easy, but it's actually happening that the 
end up referring to unexistend elements of the vectors. And sometime this 
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 
whenever they refer to an unknown/unexistent element) breaks the rendering: 
are no more shown.

So. Udo: any idea about fixing this ?


 ()   ASCII Ribbon Campaign
 /\   Keep it simple! 

reply via email to

[Prev in Thread] Current Thread [Next in Thread]