diff options
-rw-r--r-- | vcl/source/fontsubset/sft.cxx | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/vcl/source/fontsubset/sft.cxx b/vcl/source/fontsubset/sft.cxx index 81184aaf9d75..f216c34622fb 100644 --- a/vcl/source/fontsubset/sft.cxx +++ b/vcl/source/fontsubset/sft.cxx @@ -1476,8 +1476,10 @@ static int doOpenTTFont( sal_uInt32 facenum, TrueTypeFont* t ) } t->ntables = GetUInt16(t->ptr + tdoffset, 4); - if( t->ntables >= 128 ) + if (t->ntables >= 128) { + CloseTTFont(t); return SF_TTFORMAT; + } t->tables = static_cast<const sal_uInt8**>(calloc(NUM_TAGS, sizeof(sal_uInt8 *))); assert(t->tables != nullptr); |