blob: cad2e9d354df78fa157cacfeae80b2d710524ade [file] [log] [blame]
// Copyright 2018 The ChromiumOS Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include <fuzzer/FuzzedDataProvider.h>
#include "imageloader/manifest.h"
#include "base/logging.h"
class Environment {
public:
Environment() {
logging::SetMinLogLevel(logging::LOGGING_FATAL); // <- DISABLE LOGGING.
}
};
extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
static Environment env;
imageloader::Manifest manifest;
manifest.ParseManifest(
std::string(reinterpret_cast<const char*>(data), size));
return 0;
}