diff options
author | Caolán McNamara <caolanm@redhat.com> | 2021-03-22 11:46:11 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2021-03-22 17:06:25 +0100 |
commit | 966a91cb034df6e6031c149bd51142cccf859210 (patch) | |
tree | b1e579d592c67e52d3a616adff818209866d7aa9 /vcl/source/fontsubset | |
parent | 6a45671d64f6c8c6e9cbc0e5e2388e5bc9b281e9 (diff) |
cid#1474278 Untrusted divisor
Change-Id: Iacb87bad88444864303476fbb9a9cf12eb1b5221
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112887
Tested-by: Jenkins
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 d2936b9e0583..a08e475e4ebf 100644 --- a/vcl/source/fontsubset/sft.cxx +++ b/vcl/source/fontsubset/sft.cxx @@ -2039,7 +2039,7 @@ void GetTTGlobalFontInfo(TrueTypeFont *ttf, TTGlobalFontInfo *info) info->weight = GetUInt16(table, OS2_usWeightClass_offset); info->width = GetUInt16(table, OS2_usWidthClass_offset); - if (table_size >= OS2_V0_length) { + if (table_size >= OS2_V0_length && UPEm != 0) { info->typoAscender = XUnits(UPEm,GetInt16(table, OS2_typoAscender_offset)); info->typoDescender = XUnits(UPEm, GetInt16(table, OS2_typoDescender_offset)); info->typoLineGap = XUnits(UPEm, GetInt16(table, OS2_typoLineGap_offset)); |