[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Devel] infinite loop/autohinter crash
From: |
Scott Long |
Subject: |
Re: [Devel] infinite loop/autohinter crash |
Date: |
Thu, 13 Dec 2001 16:55:26 -0800 |
I have located the problem. Our translation process is not at fault -- we
extract TTF data from a PCL stream and convert it to a TTF file image. It
turns out the PCL data stream itself has some problems.
Blame Windows :-)
Here's the patch I just came up with as a temporary fix. It just makes
FreeType a little more defensive. I'm sure you guys can come up with a better
way to handle this sort of error, but for the moment, this patch works for me:
--- ttgload.c Sat Jul 7 09:12:14 2001
+++ ttgload.c Thu Dec 13 16:57:52 2001
@@ -723,6 +723,13 @@
if ( index < (FT_UInt)face->num_locations - 1 )
count = face->glyph_locations[index + 1] - offset;
+ if ( count < 10 )
+ {
+ /* This glyph is corrupted -- it does not have a complete header */
+ error = TT_Err_Invalid_Outline;
+ goto Fail;
+ }
+
if ( count == 0 )
{
/* as described by Frederic Loyer, these are spaces, and */
(end of patch)
On Thursday 13 December 2001 04:57 pm, you wrote:
> Werner LEMBERG wrote:
> > The remaining tables are completely useless. It seems that your
> > translation process is severely broken.
> >
> > Just, any chance to make ttDump continue? Since FreeType 1 can
> > display the font (albeit incompletely), the errors aren't apparently
> > too severe.
>
> I second Werner here: it would be great to have a way to somewhat pass
> over "benign" fault/exception. But I understand this is nowhere near
> from easy...
>
> Back to the topic, though, Scott did a valid point that you (Werner)
> is relaying to Just: we should not allow the engine to stop badly
> on such a problem; and Scott's point is that it concerns Freetype...
>
>
>
> Antoine
>
> _______________________________________________
> Devel mailing list
> address@hidden
> http://www.freetype.org/mailman/listinfo/devel