Newer
Older
minerva / Meta / Lagom / Fuzzers / FuzzWasmParser.cpp
@minerva minerva on 13 Jul 467 bytes Initial commit
/*
 * Copyright (c) 2021, the SerenityOS developers.
 *
 * SPDX-License-Identifier: BSD-2-Clause
 */

#include <AK/MemoryStream.h>
#include <LibWasm/Types.h>
#include <stddef.h>
#include <stdint.h>

extern "C" int LLVMFuzzerTestOneInput(uint8_t const* data, size_t size)
{
    AK::set_debug_enabled(false);
    ReadonlyBytes bytes { data, size };
    FixedMemoryStream stream { bytes };
    [[maybe_unused]] auto result = Wasm::Module::parse(stream);
    return 0;
}