[Libreoffice-commits] core.git: vcl/source
Caolán McNamara (via logerrit)
logerrit at kemper.freedesktop.org
Mon Mar 22 16:07:16 UTC 2021
vcl/source/fontsubset/sft.cxx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
New commits:
commit 966a91cb034df6e6031c149bd51142cccf859210
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Mon Mar 22 11:46:11 2021 +0000
Commit: Caolán McNamara <caolanm at redhat.com>
CommitDate: Mon Mar 22 17:06:25 2021 +0100
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 at redhat.com>
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));
More information about the Libreoffice-commits
mailing list