38f338ba422c71ae1255836e4bcce456e91d1543
[platform/upstream/harfbuzz.git] / test / fuzzing / hb-subset-get-codepoints-fuzzer.cc
1 #include "hb-fuzzer.hh"
2
3 #include <stdlib.h>
4 #include <stdio.h>
5 #include <string.h>
6
7 #include "hb-subset.h"
8
9 extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size)
10 {
11   hb_blob_t *blob = hb_blob_create ((const char *)data, size,
12                                     HB_MEMORY_MODE_READONLY, NULL, NULL);
13   hb_face_t *face = hb_face_create (blob, 0);
14
15   hb_set_t *output = hb_set_create();
16   hb_subset_get_all_codepoints (face, output);
17
18   hb_set_destroy (output);
19   hb_face_destroy (face);
20   hb_blob_destroy (blob);
21
22   return 0;
23 }