From 08268691aaf22444179e1360ad95403988755126 Mon Sep 17 00:00:00 2001 From: Werner Lemberg Date: Fri, 28 Apr 2023 15:32:16 +0200 Subject: [PATCH] * src/sfnt/ttload.c (tt_face_load_font_dir): Add another guard. Reject 'OTTO' fonts with no valid tables. --- src/sfnt/ttload.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/sfnt/ttload.c b/src/sfnt/ttload.c index 14f625c82..7b44e9cd2 100644 --- a/src/sfnt/ttload.c +++ b/src/sfnt/ttload.c @@ -504,6 +504,13 @@ FT_FRAME_EXIT(); + if ( !valid_entries ) + { + FT_TRACE2(( "tt_face_load_font_dir: no valid tables found\n" )); + error = FT_THROW( Unknown_File_Format ); + goto Exit; + } + FT_TRACE2(( "table directory loaded\n" )); FT_TRACE2(( "\n" ));