summaryrefslogtreecommitdiffstats
path: root/chromium/third_party/expat/fuzz/expat_xml_parse_fuzzer.cc
diff options
context:
space:
mode:
authorBen Wagner <bungeman@chromium.org>2019-12-05 14:19:15 +0100
committerMichael BrĂ¼ning <michael.bruning@qt.io>2019-12-05 18:23:22 +0000
commit0ee076e7a6507637efad493edc367fd63b7e7fb1 (patch)
tree95857f1b7fa78bc243904c91f96b0db76b74444f /chromium/third_party/expat/fuzz/expat_xml_parse_fuzzer.cc
parentd00dd9bddf1b2c78aff0b858ef0cc5c2a59b2817 (diff)
[Backport] CVE-2019-15903v5.9.9
Roll expat to R_2_2_8-5-g4f23e05 Diffs here should match those at https://github.com/libexpat/libexpat/compare/39e487da353b20bb3a724311d179ba0fddffc65b..4f23e05a33a66c5962589a32c87df4fe68144fce Bug: chromium:1004341 Change-Id: I9a105b4e7635c262be4d090415b011e74b00c143 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'chromium/third_party/expat/fuzz/expat_xml_parse_fuzzer.cc')
-rw-r--r--chromium/third_party/expat/fuzz/expat_xml_parse_fuzzer.cc30
1 files changed, 0 insertions, 30 deletions
diff --git a/chromium/third_party/expat/fuzz/expat_xml_parse_fuzzer.cc b/chromium/third_party/expat/fuzz/expat_xml_parse_fuzzer.cc
deleted file mode 100644
index b4120713633..00000000000
--- a/chromium/third_party/expat/fuzz/expat_xml_parse_fuzzer.cc
+++ /dev/null
@@ -1,30 +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 "third_party/expat/files/lib/expat.h"
-
-#include <vector>
-
-std::vector<const char*> kEncodings = {{"UTF-16", "UTF-8", "ISO-8859-1",
- "US-ASCII", "UTF-16BE", "UTF-16LE",
- "INVALIDENCODING"}};
-
-// Entry point for LibFuzzer.
-extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
- const char* dataPtr = reinterpret_cast<const char*>(data);
-
- for (int use_ns = 0; use_ns <= 1; ++use_ns) {
- for (auto enc : kEncodings) {
- XML_Parser parser =
- use_ns ? XML_ParserCreateNS(enc, '\n') : XML_ParserCreate(enc);
- XML_Parse(parser, dataPtr, size, true);
- XML_ParserFree(parser);
- }
- }
-
- return 0;
-}