[Libreoffice-commits] core.git: vcl/source
Caolán McNamara (via logerrit)
logerrit at kemper.freedesktop.org
Wed Mar 24 15:19:42 UTC 2021
vcl/source/fontsubset/sft.cxx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
New commits:
commit ea5da55b83b1a570a083dced4eb276cb2ac31e77
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Wed Mar 24 08:49:36 2021 +0000
Commit: Caolán McNamara <caolanm at redhat.com>
CommitDate: Wed Mar 24 16:18:52 2021 +0100
cid#1474444 Division or modulo by zero
Change-Id: I46b5c64c250860e38f9d3601266db039a705d9b3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113020
Tested-by: Caolán McNamara <caolanm at redhat.com>
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/vcl/source/fontsubset/sft.cxx b/vcl/source/fontsubset/sft.cxx
index b4932164b98a..abad6bd1e484 100644
--- a/vcl/source/fontsubset/sft.cxx
+++ b/vcl/source/fontsubset/sft.cxx
@@ -2062,7 +2062,7 @@ void GetTTGlobalFontInfo(TrueTypeFont *ttf, TTGlobalFontInfo *info)
GetTTGlobalFontHeadInfo(ttf, info->xMin, info->yMin, info->xMax, info->yMax, info->macStyle);
table = ttf->table(O_hhea, table_size);
- if (table_size >= 10)
+ if (table_size >= 10 && UPEm != 0)
{
info->ascender = XUnits(UPEm, GetInt16(table, HHEA_ascender_offset));
info->descender = XUnits(UPEm, GetInt16(table, HHEA_descender_offset));
More information about the Libreoffice-commits
mailing list