ladybird/Meta/Lagom/Fuzzers/FuzzZip.cpp
implicitfield 28c99e7a1f LibArchive+Utilities: Stop using DeprecatedString
This also slightly improves error propagation in tar, unzip and zip.
2023-01-08 09:54:08 +00:00

23 lines
474 B
C++

/*
* Copyright (c) 2021, the SerenityOS developers.
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#include <LibArchive/Zip.h>
#include <stddef.h>
#include <stdint.h>
extern "C" int LLVMFuzzerTestOneInput(uint8_t const* data, size_t size)
{
auto zip_file = Archive::Zip::try_create({ data, size });
if (!zip_file.has_value())
return 0;
(void)zip_file->for_each_member([](auto&) {
return IterationDecision::Continue;
});
return 0;
}