[Libreoffice-commits] core.git: vcl/source
Caolán McNamara (via logerrit)
logerrit at kemper.freedesktop.org
Wed Mar 24 15:20:25 UTC 2021
vcl/source/fontsubset/sft.cxx | 2 ++
1 file changed, 2 insertions(+)
New commits:
commit 90477ff28ed3b8597ea373efc936a46b00955407
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Wed Mar 24 08:51:05 2021 +0000
Commit: Caolán McNamara <caolanm at redhat.com>
CommitDate: Wed Mar 24 16:19:36 2021 +0100
cid#1474278 Untrusted divisor
Change-Id: Ia7b399d1ccb27317c1ac7f3505f435797b8f47dd
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113021
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 abad6bd1e484..5208b46adb28 100644
--- a/vcl/source/fontsubset/sft.cxx
+++ b/vcl/source/fontsubset/sft.cxx
@@ -2009,6 +2009,8 @@ bool GetTTGlobalFontHeadInfo(const AbstractTrueTypeFont *ttf, int& xMin, int& yM
return false;
const int UPEm = ttf->unitsPerEm();
+ if (UPEm == 0)
+ return false;
xMin = XUnits(UPEm, GetInt16(table, HEAD_xMin_offset));
yMin = XUnits(UPEm, GetInt16(table, HEAD_yMin_offset));
xMax = XUnits(UPEm, GetInt16(table, HEAD_xMax_offset));
More information about the Libreoffice-commits
mailing list