summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2022-03-01 09:35:34 +0000
committerMichael Stahl <michael.stahl@allotropia.de>2022-03-03 13:38:06 +0100
commitf02a24ef1922d7c90d427ae3ac6babb36f26b059 (patch)
tree35edf1c71265ad30b68babaed1a74f503ec5296b
parentec8dda5969a7f6f65c1f09598c7dcfc4d7e6913b (diff)
ofz: glyph data must be at least 10 bytes long to be useful
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130767 Reviewed-by: Michael Stahl <michael.stahl@allotropia.de> Tested-by: Jenkins (cherry picked from commit b228045cf3fb50128fd40a8f26376443ad22f874) Change-Id: I312c33c598013feced15c6f2dbcc66e493b703e6
-rw-r--r--vcl/source/fontsubset/ttcr.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/vcl/source/fontsubset/ttcr.cxx b/vcl/source/fontsubset/ttcr.cxx
index 4af9c1b7cce1..0c0c639aacda 100644
--- a/vcl/source/fontsubset/ttcr.cxx
+++ b/vcl/source/fontsubset/ttcr.cxx
@@ -1269,7 +1269,7 @@ static void ProcessTables(TrueTypeCreator *tt)
/* printf("IDs: %d %d.\n", gd->glyphID, gd->newID); */
- if (gd->nbytes != 0) {
+ if (gd->nbytes >= 10) {
z = GetInt16(gd->ptr, 2);
if (z < xMin) xMin = z;