diff options
author | Caolán McNamara <caolanm@redhat.com> | 2021-03-24 08:49:36 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2021-03-24 16:18:52 +0100 |
commit | ea5da55b83b1a570a083dced4eb276cb2ac31e77 (patch) | |
tree | 6226cc0879c71444ce36e7a907f04049b062f122 /vcl/source/fontsubset | |
parent | 2206e6e8f0cd392b32059fb8ecb7a3e1fa38be60 (diff) |
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@redhat.com>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'vcl/source/fontsubset')
-rw-r--r-- | vcl/source/fontsubset/sft.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
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)); |