aboutsummaryrefslogtreecommitdiff
path: root/projects/libxml2
diff options
context:
space:
mode:
authorMax Moroz <dor3s1@gmail.com>2018-12-27 08:43:07 -0800
committerGitHub <noreply@github.com>2018-12-27 08:43:07 -0800
commit17e1a02f7bd41a57318dda128a1996aeecb7eb14 (patch)
tree297fdb03dac5af10d63f4d554f92105b2ea7978d /projects/libxml2
parent9d0ab6e60e16df59536498d6ab36e321bd246a7b (diff)
downloadoss-fuzz-17e1a02f7bd41a57318dda128a1996aeecb7eb14.tar.gz
[libxml2] Remove libxml2_xml_regexp_compile_fuzzer. (#1988)
Diffstat (limited to 'projects/libxml2')
-rwxr-xr-xprojects/libxml2/build.sh2
-rw-r--r--projects/libxml2/libxml2_xml_regexp_compile_fuzzer.cc34
2 files changed, 1 insertions, 35 deletions
diff --git a/projects/libxml2/build.sh b/projects/libxml2/build.sh
index 46697b504..fe052b6f1 100755
--- a/projects/libxml2/build.sh
+++ b/projects/libxml2/build.sh
@@ -24,7 +24,7 @@ make -j$(nproc) all
seed_corpus_temp_file="$OUT/xml_seed_corpus.zip"
zip -r $seed_corpus_temp_file $SRC/libxml2/test
-for fuzzer in libxml2_xml_read_memory_fuzzer libxml2_xml_reader_for_file_fuzzer libxml2_xml_regexp_compile_fuzzer; do
+for fuzzer in libxml2_xml_read_memory_fuzzer libxml2_xml_reader_for_file_fuzzer; do
$CXX $CXXFLAGS -std=c++11 -Iinclude/ \
$SRC/$fuzzer.cc -o $OUT/$fuzzer \
-lFuzzingEngine .libs/libxml2.a
diff --git a/projects/libxml2/libxml2_xml_regexp_compile_fuzzer.cc b/projects/libxml2/libxml2_xml_regexp_compile_fuzzer.cc
deleted file mode 100644
index 65aba2962..000000000
--- a/projects/libxml2/libxml2_xml_regexp_compile_fuzzer.cc
+++ /dev/null
@@ -1,34 +0,0 @@
-// Copyright 2016 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include <stddef.h>
-#include <stdint.h>
-
-#include <algorithm>
-#include <string>
-#include <vector>
-
-#include "libxml/parser.h"
-#include "libxml/tree.h"
-#include "libxml/xmlversion.h"
-
-
-void ignore (void * ctx, const char * msg, ...) {
- // Error handler to avoid spam of error messages from libxml parser.
-}
-
-
-// Entry point for LibFuzzer.
-extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
- xmlSetGenericErrorFunc(NULL, &ignore);
-
- std::vector<uint8_t> buffer(size + 1, 0);
- std::copy(data, data + size, buffer.data());
-
- xmlRegexpPtr x = xmlRegexpCompile(buffer.data());
- if (x)
- xmlRegFreeRegexp(x);
-
- return 0;
-}