From deb261556a0af4495233b782c2aa74a53af4d478 Mon Sep 17 00:00:00 2001 From: Werner Lemberg Date: Fri, 9 Sep 2016 22:13:33 +0200 Subject: [PATCH] [ftfuzzer] Minor improvements. * src/tools/ftfuzzer/ftfuzzer.cc (LLVMFuzzerTestOneInput): Ignore invalid strikes. Use better values for call to `FT_Set_Char_Size'. --- ChangeLog | 8 ++++++++ src/tools/ftfuzzer/ftfuzzer.cc | 6 ++++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index a1bcfb0ae..6beb471c5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2016-09-09 Werner Lemberg + + [ftfuzzer] Minor improvements. + + * src/tools/ftfuzzer/ftfuzzer.cc (LLVMFuzzerTestOneInput): Ignore + invalid strikes. + Use better values for call to `FT_Set_Char_Size'. + 2016-09-09 Werner Lemberg [sfnt] Don't provide (completely) broken strike data. diff --git a/src/tools/ftfuzzer/ftfuzzer.cc b/src/tools/ftfuzzer/ftfuzzer.cc index 39f2b3932..c2c48b96e 100644 --- a/src/tools/ftfuzzer/ftfuzzer.cc +++ b/src/tools/ftfuzzer/ftfuzzer.cc @@ -257,12 +257,14 @@ if ( !fixed_sizes_index ) { // set up 20pt at 72dpi as an arbitrary size - FT_Set_Char_Size( face, 20, 20, 72, 72 ); + if ( FT_Set_Char_Size( face, 20 * 64, 20 * 64, 72, 72 ) ); + continue; flags |= FT_LOAD_NO_BITMAP; } else { - FT_Select_Size( face, fixed_sizes_index - 1 ); + if ( FT_Select_Size( face, fixed_sizes_index - 1 ) ) + continue; flags |= FT_LOAD_COLOR; }