diff options
author | Werner Lemberg <wl@gnu.org> | 2005-08-29 11:59:18 +0000 |
---|---|---|
committer | Werner Lemberg <wl@gnu.org> | 2005-08-29 11:59:18 +0000 |
commit | 9d361ea0b702090269d4e18d84418f16e458b19e (patch) | |
tree | 1324c7f06c001cfd7a0783396168706c284b6583 | |
parent | 7a3ba73782f203078bde5a24f65aacd33f95d603 (diff) | |
download | freetype2-9d361ea0b702090269d4e18d84418f16e458b19e.tar.gz |
* src/truetype/ttgload.c [TT_MAX_COMPOSITE_RECURSE]: Removed.
(load_truetype_glyph): Limit recursion depth by `maxComponentDepth'.
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | src/truetype/ttgload.c | 11 |
2 files changed, 6 insertions, 10 deletions
@@ -1,3 +1,8 @@ +2005-08-28 George Williams <gww@silcom.com> + + * src/truetype/ttgload.c [TT_MAX_COMPOSITE_RECURSE]: Removed. + (load_truetype_glyph): Limit recursion depth by `maxComponentDepth'. + 2005-08-25 J. Ali Harlow <ali@avrc.city.ac.uk> * builds/unix/freetype2.in (CFlags): Add missing directory. diff --git a/src/truetype/ttgload.c b/src/truetype/ttgload.c index 68a9c7402..9d44790a3 100644 --- a/src/truetype/ttgload.c +++ b/src/truetype/ttgload.c @@ -63,15 +63,6 @@ #define UNSCALED_COMPONENT_OFFSET 0x1000 -/* Maximum recursion depth we allow for composite glyphs. - * The TrueType spec doesn't say anything about recursion, - * so it isn't clear that recursion is allowed at all. But - * we'll be generous. - */ -#define TT_MAX_COMPOSITE_RECURSE 5 - - - /*************************************************************************/ /* */ /* <Function> */ @@ -1221,7 +1212,7 @@ #endif - if ( recurse_count >= TT_MAX_COMPOSITE_RECURSE ) + if ( recurse_count >= face->max_profile.maxComponentDepth ) { error = TT_Err_Invalid_Composite; goto Exit; |