2021-05-01 18:28:11 +03:00
|
|
|
/*
|
|
|
|
* Copyright (c) 2021, the SerenityOS developers.
|
|
|
|
*
|
|
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
|
|
*/
|
|
|
|
|
2022-12-04 21:02:33 +03:00
|
|
|
#include <AK/DeprecatedString.h>
|
2021-05-01 18:28:11 +03:00
|
|
|
#include <LibTextCodec/Decoder.h>
|
|
|
|
#include <stddef.h>
|
|
|
|
#include <stdint.h>
|
|
|
|
|
2022-04-01 20:58:27 +03:00
|
|
|
extern "C" int LLVMFuzzerTestOneInput(uint8_t const* data, size_t size)
|
2021-05-01 18:28:11 +03:00
|
|
|
{
|
2023-02-13 20:23:31 +03:00
|
|
|
auto* decoder = TextCodec::decoder_for("windows-1251"sv);
|
2021-05-01 18:28:11 +03:00
|
|
|
VERIFY(decoder);
|
|
|
|
decoder->to_utf8({ data, size });
|
|
|
|
return 0;
|
|
|
|
}
|