mirror of
https://gitlab.freedesktop.org/freetype/freetype.git
synced 2026-05-05 10:08:12 +02:00
Better maxComponentDepth test.
This commit is contained in:
parent
3033f4366b
commit
0f6f367ec1
1 changed files with 4 additions and 3 deletions
|
|
@ -1084,9 +1084,10 @@
|
|||
#endif
|
||||
|
||||
|
||||
/* some fonts haven't this field set correctly, */
|
||||
/* thus we add 1 to catch the majority of them */
|
||||
if ( recurse_count > (FT_UInt)face->max_profile.maxComponentDepth + 1 )
|
||||
/* some fonts have an incorrect value of `maxComponentDepth', */
|
||||
/* thus we allow depth 1 to catch the majority of them */
|
||||
if ( recurse_count > 1 &&
|
||||
recurse_count > face->max_profile.maxComponentDepth )
|
||||
{
|
||||
error = TT_Err_Invalid_Composite;
|
||||
goto Exit;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue