vcl/source/fontsubset/ttcr.cxx |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit c8ce8980b35edf394d72848fa777de49c37513e1
Author:     Caolán McNamara <caol...@redhat.com>
AuthorDate: Tue Mar 1 09:35:34 2022 +0000
Commit:     Caolán McNamara <caol...@redhat.com>
CommitDate: Tue Mar 1 15:09:13 2022 +0100

    ofz: glyph data must be at least 10 bytes long to be useful
    
    Change-Id: I312c33c598013feced15c6f2dbcc66e493b703e6
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130752
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caol...@redhat.com>

diff --git a/vcl/source/fontsubset/ttcr.cxx b/vcl/source/fontsubset/ttcr.cxx
index f923e344cda3..40729ffd101d 100644
--- a/vcl/source/fontsubset/ttcr.cxx
+++ b/vcl/source/fontsubset/ttcr.cxx
@@ -1274,7 +1274,7 @@ static void ProcessTables(TrueTypeCreator *tt)
 
         /* printf("IDs: %d %d.\n", gd->glyphID, gd->newID); */
 
-        if (gd->nbytes != 0) {
+        if (gd->nbytes >= 10) {
             sal_Int16 z = GetInt16(gd->ptr, 2);
             if (z < xMin) xMin = z;
 

Reply via email to