diff --git a/fuzz/cmark-fuzz.c b/fuzz/cmark-fuzz.c index b29063252..33ce23655 100644 --- a/fuzz/cmark-fuzz.c +++ b/fuzz/cmark-fuzz.c @@ -34,6 +34,10 @@ int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) { case 1: { FILE *file = fmemopen((void *) markdown, markdown_size, "r"); + if (file == NULL) { + perror("fmemopen"); + abort(); + } doc = cmark_parse_file(file, options); fclose(file); break;