Commit 22495625 authored by Brad King's avatar Brad King Committed by Kitware Robot
Browse files

Merge topic 'fuzz1'


 Tests: Add a fuzzer for oss-fuzz
Acked-by: Kitware Robot's avatarKitware Robot <>
Merge-request: !5668
parents 967d1f7d b0107165
Pipeline #209166 canceled with stages
in 1 minute and 27 seconds
The fuzzers in this directory are run continuously through OSS-fuzz.
All fuzzers are implemented by way of the `libFuzzer engine`_.
The link to the OSS-fuzz integration can be found here: (pending)
All email addresses in the `project.yaml` file on OSS-fuzz will have access
to detailed bug reports and will be notified via email if/when bugs are found.
.. _`libFuzzer Engine`:
/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying
file Copyright.txt or for details. */
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include "cmXMLParser.h"
extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size)
char test_file[] = "libfuzzer.xml";
FILE* fp = fopen(test_file, "wb");
if (!fp)
return 0;
fwrite(data, size, 1, fp);
cmXMLParser parser;
if (!parser.ParseFile(test_file)) {
return 1;
return 0;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment