From a5ecfb4ce6f4f42f5346c664b57ab80c2bdf3664 Mon Sep 17 00:00:00 2001 From: Werner Lemberg Date: Sat, 17 Oct 2015 06:15:55 +0200 Subject: [PATCH] * src/cid/cidload.c (cid_parse_dict): Handle invalid input (#46220). --- ChangeLog | 6 +++++- src/cid/cidload.c | 7 +++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index a71cb866c..442b4f3b7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,8 @@ -2015-10-15 Kostya Serebryany +2015-10-15 Werner Lemberg + + * src/cid/cidload.c (cid_parse_dict): Handle invalid input (#46220). + +2015-10-15 Kostya Serebryany [ftfuzzer] Add README. diff --git a/src/cid/cidload.c b/src/cid/cidload.c index e23b82f67..c94b881ea 100644 --- a/src/cid/cidload.c +++ b/src/cid/cidload.c @@ -395,7 +395,14 @@ cur = parser->root.cursor; } + + if ( !face->cid.num_dicts ) + { + FT_ERROR(( "cid_parse_dict: No font dictionary found\n" )); + return FT_THROW( Invalid_File_Format ); + } } + return parser->root.error; }