fuzzers: HttpResponse is a superset of HttpStatus

HttpResponse covers http::Response::readData(), HttpStatus covered
http::StatusLine::parse(). The first calls the second, so remove the
second.

Signed-off-by: Miklos Vajna <vmiklos@collabora.com>
Change-Id: I163819ca470b766a7bc4694a9c6cfe4919e17963
This commit is contained in:
Miklos Vajna 2021-04-28 08:35:02 +02:00
parent 64ab87f65c
commit f4759515be
7 changed files with 2 additions and 40 deletions

View file

@ -145,8 +145,7 @@ if ENABLE_LIBFUZZER
noinst_PROGRAMS += \
admin_fuzzer \
clientsession_fuzzer \
httpresponse_fuzzer \
httpstatus_fuzzer
httpresponse_fuzzer
else
noinst_PROGRAMS += loolwsd_fuzzer
endif
@ -207,16 +206,6 @@ httpresponse_fuzzer_SOURCES = \
fuzzer/HttpResponse.cpp
httpresponse_fuzzer_LDFLAGS = -fsanitize=fuzzer $(AM_LDFLAGS)
httpstatus_fuzzer_CPPFLAGS = \
-DKIT_IN_PROCESS=1 \
$(AM_CPPFLAGS)
httpstatus_fuzzer_SOURCES = \
$(loolwsd_sources) \
$(loolforkit_sources) \
$(shared_sources) \
fuzzer/HttpStatus.cpp
httpstatus_fuzzer_LDFLAGS = -fsanitize=fuzzer $(AM_LDFLAGS)
clientnb_SOURCES = net/clientnb.cpp \
common/Log.cpp \
common/StringVector.cpp \

View file

@ -1,15 +0,0 @@
#include <iostream>
#include "config.h"
#include <net/HttpRequest.hpp>
extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size)
{
http::StatusLine statusLine;
int64_t length = size;
statusLine.parse(reinterpret_cast<const char*>(data), length);
return 0;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */

View file

@ -19,13 +19,7 @@ Run the fuzzers like this:
./clientsession_fuzzer -max_len=16384 fuzzer/data/
----
- HttpStatus:
----
./httpstatus_fuzzer -max_len=16384 fuzzer/httpstatus-data/
----
- HttpRessponse:
- HttpResponse:
----
./httpresponse_fuzzer -max_len=16384 fuzzer/httpresponse-data/

View file

@ -1 +0,0 @@
HTTP/1.19999999999999999999999999999999999999999999999

View file

@ -1 +0,0 @@
HTTP/1.1 101 Something Something