summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2022-09-14 09:11:52 +0100
committerCaolán McNamara <caolanm@redhat.com>2022-09-14 11:48:18 +0200
commitcda1dbd978dba5bb8cd64ab28173a579133d4711 (patch)
treeafdb8ffd125908ca2e50c4e6013a1eb297f9a726 /vcl
parent4ae293276133a12a8251585b6a37896907bbd67e (diff)
ofz#51205 Timeout
the len here gets eventually assigned to sal_uInt16 of GlyphData::npoints Change-Id: If8217f5d414d1e627829df6a20d0c544a920e9ed Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139906 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'vcl')
-rw-r--r--vcl/source/fontsubset/sft.cxx6
1 files changed, 6 insertions, 0 deletions
diff --git a/vcl/source/fontsubset/sft.cxx b/vcl/source/fontsubset/sft.cxx
index 955e70b347c6..7e9d6e69ceff 100644
--- a/vcl/source/fontsubset/sft.cxx
+++ b/vcl/source/fontsubset/sft.cxx
@@ -675,6 +675,12 @@ static int GetCompoundTTOutline(AbstractTrueTypeFont *ttf, sal_uInt32 glyphID, C
free(nextComponent);
+ if (myPoints.size() > SAL_MAX_UINT16) {
+ SAL_WARN("vcl.fonts", "number of points has to be limited to max value GlyphData::npoints can contain, abandon effort");
+ myPoints.clear();
+ break;
+ }
+
} while (flags & MORE_COMPONENTS);
// #i123417# some fonts like IFAOGrec have no outline points in some compound glyphs