vcl/source/fontsubset/sft.cxx | 2 ++ 1 file changed, 2 insertions(+) New commits: commit 90477ff28ed3b8597ea373efc936a46b00955407 Author: Caolán McNamara <caol...@redhat.com> AuthorDate: Wed Mar 24 08:51:05 2021 +0000 Commit: Caolán McNamara <caol...@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 <caol...@redhat.com> Reviewed-by: Caolán McNamara <caol...@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)); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits