ref: deb261556a0af4495233b782c2aa74a53af4d478
parent: d609b7c1582a9714bbad831fc5f955bccca436a4
author: Werner Lemberg <[email protected]>
date: Fri Sep 9 18:13:33 EDT 2016
[ftfuzzer] Minor improvements. * src/tools/ftfuzzer/ftfuzzer.cc (LLVMFuzzerTestOneInput): Ignore invalid strikes. Use better values for call to `FT_Set_Char_Size'.
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,13 @@
2016-09-09 Werner Lemberg <[email protected]>
+ [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 <[email protected]>
+
[sfnt] Don't provide (completely) broken strike data.
FreeType tries to sanitize strike header data; we now reject
--- 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;
}