diff options
author | Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io> | 2018-12-10 14:59:49 +0100 |
---|---|---|
committer | Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io> | 2019-01-31 10:40:41 +0000 |
commit | 02280535bea08395871722f733aaaed70c992260 (patch) | |
tree | 8ff7fd6a26710645d18887fad6299ae7debfded1 /src/3rdparty/freetype/src/tools/ftfuzzer/runinput.cc | |
parent | 93a803a6de27d9eb57931c431b5f3d074914f693 (diff) |
Update bundled Freetype to 2.9.1
This is required to support the new emoji font on Android 9.
[ChangeLog][Freetype] Upgraded bundled Freetype version to 2.9.1.
This also adds support for the latest emoji font in use on
Android 9.
Fixes: QTBUG-70657
Change-Id: I99be72f0d23c20aca122b8fdadd4ded87b2edce1
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Diffstat (limited to 'src/3rdparty/freetype/src/tools/ftfuzzer/runinput.cc')
-rw-r--r-- | src/3rdparty/freetype/src/tools/ftfuzzer/runinput.cc | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/src/3rdparty/freetype/src/tools/ftfuzzer/runinput.cc b/src/3rdparty/freetype/src/tools/ftfuzzer/runinput.cc new file mode 100644 index 0000000000..2b02f57580 --- /dev/null +++ b/src/3rdparty/freetype/src/tools/ftfuzzer/runinput.cc @@ -0,0 +1,58 @@ +// runinput.cc +// +// A `main' function for fuzzers like `ftfuzzer.cc'. +// +// Copyright 2015-2018 by +// David Turner, Robert Wilhelm, and Werner Lemberg. +// +// This file is part of the FreeType project, and may only be used, +// modified, and distributed under the terms of the FreeType project +// license, LICENSE.TXT. By continuing to use, modify, or distribute +// this file you indicate that you have read the license and +// understand and accept it fully. + + +#include <assert.h> +#include <stdio.h> +#include <string.h> +#include <stdlib.h> +#include <stdint.h> + + + extern "C" void + LLVMFuzzerTestOneInput( const uint8_t* data, + size_t size ); + + + unsigned char a[1 << 24]; + + + int + main( int argc, + char* *argv ) + { + assert( argc >= 2 ); + + for ( int i = 1; i < argc; i++ ) + { + fprintf( stderr, "%s\n", argv[i] ); + + FILE* f = fopen( argv[i], "r" ); + assert( f ); + + size_t n = fread( a, 1, sizeof ( a ), f ); + fclose( f ); + if ( !n ) + continue; + + unsigned char* b = (unsigned char*)malloc( n ); + memcpy( b, a, n ); + + LLVMFuzzerTestOneInput( b, n ); + + free( b ); + } + } + + +// END |