[fuzzing] Fold get-codepoints-fuzzer into subset-fuzzer

This commit is contained in:
Behdad Esfahbod 2018-10-11 17:08:12 -04:00
parent 2c824d3644
commit 120ed02725
3 changed files with 5 additions and 39 deletions

View File

@ -23,7 +23,6 @@ EXTRA_DIST += \
check_PROGRAMS = \
hb-shape-fuzzer \
hb-subset-fuzzer \
hb-subset-get-codepoints-fuzzer \
$(NULL)
AM_CPPFLAGS = \
@ -65,21 +64,6 @@ hb_subset_fuzzer_DEPENDENCIES = \
lib \
$(NULL)
hb_subset_get_codepoints_fuzzer_SOURCES = \
hb-fuzzer.hh \
hb-subset-get-codepoints-fuzzer.cc \
main.cc \
$(NULL)
hb_subset_get_codepoints_fuzzer_LDADD = \
$(top_builddir)/src/libharfbuzz-subset-fuzzing.la \
$(NULL)
hb_subset_get_codepoints_fuzzer_CPPFLAGS = \
$(AM_CPPFLAGS) \
$(NULL)
hb_subset_get_codepoints_fuzzer_DEPENDENCIES = \
lib \
$(NULL)
check:
EXEEXT="$(EXEEXT)" srcdir="$(srcdir)" builddir="$(builddir)" $(srcdir)/run-shape-fuzzer-tests.py
EXEEXT="$(EXEEXT)" srcdir="$(srcdir)" builddir="$(builddir)" $(srcdir)/run-subset-fuzzer-tests.py

View File

@ -50,6 +50,11 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size)
HB_MEMORY_MODE_READONLY, NULL, NULL);
hb_face_t *face = hb_face_create (blob, 0);
/* Just test this API here quickly. */
hb_set_t *output = hb_set_create();
hb_face_collect_unicodes (face, output);
hb_set_destroy (output);
const hb_codepoint_t text[] =
{
'A', 'B', 'C', 'D', 'E', 'X', 'Y', 'Z', '1', '2',

View File

@ -1,23 +0,0 @@
#include "hb-fuzzer.hh"
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include "hb-subset.h"
extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size)
{
hb_blob_t *blob = hb_blob_create ((const char *)data, size,
HB_MEMORY_MODE_READONLY, NULL, NULL);
hb_face_t *face = hb_face_create (blob, 0);
hb_set_t *output = hb_set_create();
hb_face_collect_unicodes (face, output);
hb_set_destroy (output);
hb_face_destroy (face);
hb_blob_destroy (blob);
return 0;
}