Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(593)

Side by Side Diff: testing/libfuzzer/fuzzers/libxml_xml_read_memory_fuzzer.cc

Issue 1558483003: port libxml_xml_read_memory_fuzzer (from kcc's libfuzzer-bot) and disable error messages from the p… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « testing/libfuzzer/fuzzers/BUILD.gn ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright (c) 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "libxml/parser.h"
6
7 void ignore (void * ctx, const char * msg, ...) {
8 // Error handler to avoid spam of error messages from libxml parser.
9 }
10
11 extern "C" int LLVMFuzzerTestOneInput(const unsigned char *data, size_t size) {
12 xmlSetGenericErrorFunc(NULL, &ignore);
13
14 if (auto doc = xmlReadMemory(reinterpret_cast<const char *>(data),
15 size, "noname.xml", NULL, 0)) {
16 xmlFreeDoc(doc);
17 }
18
19 return 0;
20 }
OLDNEW
« no previous file with comments | « testing/libfuzzer/fuzzers/BUILD.gn ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698