mirror of
https://github.com/moparisthebest/curl
synced 2024-11-11 20:15:03 -05:00
fuzz: corpora file structure, initial commit
This commit is contained in:
parent
b9ead67e12
commit
fd3aa8da0a
@ -3891,6 +3891,7 @@ AC_CONFIG_FILES([Makefile \
|
|||||||
tests/server/Makefile \
|
tests/server/Makefile \
|
||||||
tests/libtest/Makefile \
|
tests/libtest/Makefile \
|
||||||
tests/unit/Makefile \
|
tests/unit/Makefile \
|
||||||
|
tests/fuzz/Makefile \
|
||||||
packages/Makefile \
|
packages/Makefile \
|
||||||
packages/Win32/Makefile \
|
packages/Win32/Makefile \
|
||||||
packages/Win32/cygwin/Makefile \
|
packages/Win32/cygwin/Makefile \
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
# | (__| |_| | _ <| |___
|
# | (__| |_| | _ <| |___
|
||||||
# \___|\___/|_| \_\_____|
|
# \___|\___/|_| \_\_____|
|
||||||
#
|
#
|
||||||
# Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
|
# Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||||
#
|
#
|
||||||
# This software is licensed as described in the file COPYING, which
|
# This software is licensed as described in the file COPYING, which
|
||||||
# you should have received as part of this distribution. The terms
|
# you should have received as part of this distribution. The terms
|
||||||
@ -19,6 +19,39 @@
|
|||||||
# KIND, either express or implied.
|
# KIND, either express or implied.
|
||||||
#
|
#
|
||||||
###########################################################################
|
###########################################################################
|
||||||
|
AUTOMAKE_OPTIONS = foreign nostdinc
|
||||||
|
|
||||||
|
# Specify our include paths here, and do it relative to $(top_srcdir) and
|
||||||
|
# $(top_builddir), to ensure that these paths which belong to the library
|
||||||
|
# being currently built and tested are searched before the library which
|
||||||
|
# might possibly already be installed in the system.
|
||||||
|
#
|
||||||
|
# $(top_builddir)/include/curl for generated curlbuild.h included from curl.h
|
||||||
|
# $(top_builddir)/include for generated curlbuild.h inc. from lib/curl_setup.h
|
||||||
|
# $(top_srcdir)/include is for libcurl's external include files
|
||||||
|
# $(top_builddir)/lib is for libcurl's generated lib/curl_config.h file
|
||||||
|
# $(top_srcdir)/lib for libcurl's lib/curl_setup.h and other "borrowed" files
|
||||||
|
|
||||||
|
AM_CPPFLAGS = -I$(top_builddir)/include/curl \
|
||||||
|
-I$(top_builddir)/include \
|
||||||
|
-I$(top_srcdir)/include \
|
||||||
|
-I$(top_builddir)/lib \
|
||||||
|
-I$(top_srcdir)/lib \
|
||||||
|
-I$(top_srcdir)/tests/fuzz
|
||||||
|
|
||||||
|
EXTRA_DIST = Makefile.inc CMakeLists.txt
|
||||||
|
|
||||||
|
LIBS = -lpthread -lFuzzer -lstdc++ -lm
|
||||||
|
LDFLAGS = -L/usr/lib/llvm-5.0/lib #-L/home/daniel/src/Fuzzer/
|
||||||
|
|
||||||
|
LDADD = $(top_builddir)/lib/libcurl.la \
|
||||||
|
@LDFLAGS@ @LIBCURL_LIBS@
|
||||||
|
|
||||||
|
# Makefile.inc provides neat definitions
|
||||||
|
include Makefile.inc
|
||||||
|
|
||||||
|
checksrc:
|
||||||
|
@PERL@ $(top_srcdir)/lib/checksrc.pl $(srcdir)/*.c
|
||||||
|
|
||||||
|
noinst_PROGRAMS = $(FUZZPROGS)
|
||||||
|
|
||||||
# FIXME, probably adapt from file in ../unit
|
|
||||||
|
@ -1,19 +1,19 @@
|
|||||||
FUZZER_HTTP11 = curl_fuzzer.c
|
FUZZPROGS = http11 ftp imap pop3 httpupload http2
|
||||||
FUZZER_HTTP11_CPPFLAGS = $(AM_CPPFLAGS)
|
|
||||||
|
|
||||||
|
http11_SOURCES = curl_fuzzer.c
|
||||||
|
http11_CPPFLAGS = $(AM_CPPFLAGS)
|
||||||
|
|
||||||
FUZZER_FTP = curl_fuzzer.c
|
ftp_SOURCES = curl_fuzzer.c
|
||||||
FUZZER_FTP_CPPFLAGS = -DFUZZER_FTP $(AM_CPPFLAGS)
|
ftp_CPPFLAGS = -DFUZZER_FTP $(AM_CPPFLAGS)
|
||||||
|
|
||||||
FUZZER_IMAP = curl_fuzzer.c
|
imap_SOURCES = curl_fuzzer.c
|
||||||
FUZZER_IMAP_CPPFLAGS = -DFUZZER_IMAP $(AM_CPPFLAGS)
|
imap_CPPFLAGS = -DFUZZER_IMAP $(AM_CPPFLAGS)
|
||||||
|
|
||||||
FUZZER_POP3 = curl_fuzzer.c
|
pop3_SOURCES = curl_fuzzer.c
|
||||||
FUZZER_POP3_CPPFLAGS = -DFUZZER_POP3 $(AM_CPPFLAGS)
|
pop3_CPPFLAGS = -DFUZZER_POP3 $(AM_CPPFLAGS)
|
||||||
|
|
||||||
FUZZER_HTTP_UPLOAD = curl_fuzzer.c
|
httpupload_SOURCES = curl_fuzzer.c
|
||||||
FUZZER_HTTP_UPLOAD_CPPFLAGS = -DFUZZER_HTTP_UPLOAD $(AM_CPPFLAGS)
|
httpupload_CPPFLAGS = -DFUZZER_HTTP_UPLOAD $(AM_CPPFLAGS)
|
||||||
|
|
||||||
|
http2_SOURCES = curl_fuzzer.c
|
||||||
FUZZER_HTTP2 = curl_fuzzer.c
|
http2_CPPFLAGS = -DFUZZER_HTTP2 $(AM_CPPFLAGS)
|
||||||
FUZZER_HTTP2_CPPFLAGS = -DFUZZER_HTTP2 $(AM_CPPFLAGS)
|
|
||||||
|
8
tests/fuzz/corpora/ftp/long1.txt
Normal file
8
tests/fuzz/corpora/ftp/long1.txt
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
200 OK
|
||||||
|
200 OK
|
||||||
|
215 UNIX Type: L8
|
||||||
|
200 OK
|
||||||
|
200 OK
|
||||||
|
200 OK
|
||||||
|
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA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AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||||
|
220 OK
|
13
tests/fuzz/corpora/http1_1/200_ok.txt
Normal file
13
tests/fuzz/corpora/http1_1/200_ok.txt
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
HTTP/1.1 200 OK
|
||||||
|
Content-Encoding: gzip
|
||||||
|
Accept-Ranges: bytes
|
||||||
|
Cache-Control: max-age=604800
|
||||||
|
Content-Type: text/html
|
||||||
|
Date: Mon, 08 May 2017 19:03:58 GMT
|
||||||
|
Etag: "359670651+gzip"
|
||||||
|
Expires: Mon, 15 May 2017 19:03:58 GMT
|
||||||
|
Last-Modified: Fri, 09 Aug 2013 23:54:35 GMT
|
||||||
|
Server: ECS (ewr/15BD)
|
||||||
|
X-Cache: HIT
|
||||||
|
Content-Length: 606
|
||||||
|
|
9
tests/fuzz/corpora/http1_1/404_nf.txt
Normal file
9
tests/fuzz/corpora/http1_1/404_nf.txt
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
HTTP/1.1 404 Not Found
|
||||||
|
Cache-Control: max-age=604800
|
||||||
|
Content-Type: text/html
|
||||||
|
Date: Mon, 08 May 2017 19:04:08 GMT
|
||||||
|
Expires: Mon, 15 May 2017 19:04:08 GMT
|
||||||
|
Server: EOS (lax004/28A3)
|
||||||
|
Vary: Accept-Encoding
|
||||||
|
Content-Length: 1270
|
||||||
|
|
Loading…
Reference in New Issue
Block a user