summaryrefslogtreecommitdiff
path: root/archived/projt-launcher/fuzz/fuzz_gzip.cpp
blob: 8db3c716f434b90fd9a629a1d28e61ed32ccf980 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#include <cstdint>

#include <QByteArray>

#include "GZip.h"

extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size)
{
	QByteArray input(reinterpret_cast<const char*>(data), static_cast<int>(size));
	QByteArray output;
	QByteArray roundtrip;

	GZip::unzip(input, output);
	GZip::zip(output, roundtrip);

	return 0;
}