freetype-devel
[Top][All Lists]
Advanced

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

Re: [Devel] Recursive composite glyphs


From: David Turner
Subject: Re: [Devel] Recursive composite glyphs
Date: Wed, 08 Jan 2003 10:59:31 +0100
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.2.1) Gecko/20021130

Owen Taylor wrote:

A problem was reported to me where freetype, when given a
corrupt font that looks like it has a recursive composite
glyph, overflows it's stack and crashes. (After allocating
a huge amount of memory.)

The attached patch makes two changes in this area:

- When loading composite glyphs, it puts a hard recursion
  limit of 5 on the loading, which should be enough for
any real situation. (The TrueType spec doesn't make clear whether composite glyphs can have composite
  glyphs as subglyphs at all.)

- It makes the check for what is a composite glyph stricter; only glyphs with a contours_count of -1,
  not any negative number, are considered composite glyphs.

  (-1 is what the TT spec requires, and this will reduce
  the chance of random garbage looking like a composite
  glyph.)
Seems fine, applied now

Thanks,

- David Turner
- The FreeType Project  (www.freetype.org)





reply via email to

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