blob: e6edef42425194d9259d6629f9c0fbfee5a7316e [file] [log] [blame]
// Copyright 2019 The Chromium OS 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 "cros-disks/filesystem_label.h"
#include <string>
#include <base/logging.h>
// Disable logging.
struct Environment {
Environment() { logging::SetMinLogLevel(logging::LOGGING_FATAL); }
};
extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
static Environment env;
std::string label(reinterpret_cast<const char*>(data), size);
cros_disks::ValidateVolumeLabel(label, "vfat");
cros_disks::ValidateVolumeLabel(label, "exfat");
cros_disks::ValidateVolumeLabel(label, "ntfs");
return 0;
}