libreoffice-online/fuzzer/HttpResponse.cpp
Miklos Vajna 9afe974848 Add a fuzzer for http::Response::readData()
And remove the httpheader one, which is not useful, since it uses Poco
for the actual parsing, it did not find anything. (If we switch away
from Poco there in the future, it's easy enough to restore it.)

Also fix some problems found by the fuzzer.

Signed-off-by: Miklos Vajna <vmiklos@collabora.com>
Change-Id: I254247c46ecc78c9c3e75aac4f10c441b0e10fb3
2021-04-23 17:54:36 +02:00

14 lines
312 B
C++

#include <iostream>
#include "config.h"
#include <net/HttpRequest.hpp>
extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size)
{
http::Response response;
response.readData(reinterpret_cast<const char*>(data), size);
return 0;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */