* src/truetype/ttgxvar.c (tt_var_get_item_delta): Check `face->blend`.

Reported as

  https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=55581
This commit is contained in:
Werner Lemberg 2023-02-01 12:01:58 +01:00
parent aec87c0955
commit 9508811a3a
1 changed files with 6 additions and 6 deletions

View File

@ -1004,16 +1004,16 @@
GX_ItemVarData varData; GX_ItemVarData varData;
FT_ItemVarDelta* deltaSet; FT_ItemVarDelta* deltaSet;
FT_UInt master, j; FT_UInt master, j;
FT_Fixed* scalars; FT_Fixed* scalars;
FT_ItemVarDelta returnValue; FT_ItemVarDelta returnValue;
if ( !face->blend->normalizedcoords ) if ( !face->blend || !face->blend->normalizedcoords )
return 0; return 0;
/* OpenType 1.8.4+: No variation data for this item /* OpenType 1.8.4+: No variation data for this item */
* as indices have special value 0xFFFF. */ /* as indices have special value 0xFFFF. */
if ( outerIndex == 0xFFFF && innerIndex == 0xFFFF ) if ( outerIndex == 0xFFFF && innerIndex == 0xFFFF )
return 0; return 0;