[fuzzer] Add a fuzzer for frame info functions

Add a fuzzer that fuzzes all helper functions that take compressed
input. This fuzzer caught one out of bounds read in
`ZSTD_decompressBound()`.
This commit is contained in:
Nick Terrell
2019-04-17 11:29:42 -07:00
parent 450feb0f95
commit 09caa4d800
3 changed files with 49 additions and 1 deletions
+5 -1
View File
@@ -69,7 +69,8 @@ FUZZ_TARGETS := \
stream_decompress \
block_decompress \
dictionary_round_trip \
dictionary_decompress
dictionary_decompress \
zstd_frame_info
all: $(FUZZ_TARGETS)
@@ -100,6 +101,9 @@ dictionary_round_trip: $(FUZZ_HEADERS) $(FUZZ_OBJ) dictionary_round_trip.o
dictionary_decompress: $(FUZZ_HEADERS) $(FUZZ_OBJ) dictionary_decompress.o
$(CXX) $(FUZZ_TARGET_FLAGS) $(FUZZ_OBJ) dictionary_decompress.o $(LIB_FUZZING_ENGINE) -o $@
zstd_frame_info: $(FUZZ_HEADERS) $(FUZZ_OBJ) zstd_frame_info.o
$(CXX) $(FUZZ_TARGET_FLAGS) $(FUZZ_OBJ) zstd_frame_info.o $(LIB_FUZZING_ENGINE) -o $@
libregression.a: $(FUZZ_HEADERS) $(PRGDIR)/util.h $(PRGDIR)/util.c regression_driver.o
$(AR) $(FUZZ_ARFLAGS) $@ regression_driver.o