blob: 8e68cd41021814669ca4be64187e6a311a2e6de5 [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 "login_manager/validator_utils.h"
#include <string>
#include <base/logging.h>
// Disable logging.
struct Environment {
Environment() { logging::SetMinLogLevel(logging::LOG_FATAL); }
};
extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
static Environment env;
std::string input(reinterpret_cast<const char*>(data), size);
login_manager::ValidateEmail(input);
login_manager::ValidateAccountIdKey(input);
login_manager::ValidateExtensionId(input);
login_manager::ValidateAccountId(input, nullptr);
return 0;
}