2016-12-21 02:50:38 +00:00
|
|
|
#include "hb-fuzzer.hh"
|
|
|
|
|
2018-10-01 20:46:08 +00:00
|
|
|
#include <stdio.h>
|
2016-12-21 02:50:38 +00:00
|
|
|
|
2019-05-11 19:50:42 +00:00
|
|
|
int main (int argc, char **argv)
|
|
|
|
{
|
2019-05-11 22:48:41 +00:00
|
|
|
for (int i = 1; i < argc; i++)
|
2019-05-11 19:50:42 +00:00
|
|
|
{
|
2020-02-24 19:30:58 +00:00
|
|
|
hb_blob_t *blob = hb_blob_create_from_file (argv[i]);
|
|
|
|
|
|
|
|
unsigned int len;
|
|
|
|
const char *font_data = hb_blob_get_data (blob, &len);
|
2020-02-26 12:45:17 +00:00
|
|
|
printf ("%s%s\n", argv[i], len ? "" : " (note: not found or was empty)");
|
2020-02-24 19:30:58 +00:00
|
|
|
|
2019-05-11 19:50:42 +00:00
|
|
|
LLVMFuzzerTestOneInput ((const uint8_t *) font_data, len);
|
|
|
|
|
2020-02-24 19:30:58 +00:00
|
|
|
hb_blob_destroy (blob);
|
|
|
|
}
|
2019-05-11 19:50:42 +00:00
|
|
|
return 0;
|
2016-12-21 02:50:38 +00:00
|
|
|
}
|