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