This should improve coverage and should improve the efficiency of seed files
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
tools/target_dem_fuzzer$(EXESUF): tools/target_dem_fuzzer.o $(FF_DEP_LIBS)
$(LD) $(LDFLAGS) $(LDEXEFLAGS) $(LD_O) $^ $(ELIBS) $(FF_EXTRALIBS) $(LIBFUZZER_PATH)
+tools/target_io_dem_fuzzer$(EXESUF): tools/target_io_dem_fuzzer.o $(FF_DEP_LIBS)
+ $(LD) $(LDFLAGS) $(LDEXEFLAGS) $(LD_O) $^ $(ELIBS) $(FF_EXTRALIBS) $(LIBFUZZER_PATH)
+
tools/sofa2wavs$(EXESUF): ELIBS = $(FF_EXTRALIBS)
tools/uncoded_frame$(EXESUF): $(FF_DEP_LIBS)
tools/uncoded_frame$(EXESUF): ELIBS = $(FF_EXTRALIBS)
$(COMPILE_C) -DFFMPEG_BSF=$*
tools/target_dem_fuzzer.o: tools/target_dem_fuzzer.c
- $(COMPILE_C)
+ $(COMPILE_C) -DIO_FLAT=1
+
+tools/target_io_dem_fuzzer.o: tools/target_dem_fuzzer.c
+ $(COMPILE_C) -DIO_FLAT=0
OUTDIRS += tools
}
if (offset < 0 || offset > c->filesize)
return -1;
+ if (IO_FLAT) {
+ c->fuzz += offset - c->pos;
+ c->fuzz_size -= offset - c->pos;
+ }
c->pos = offset;
return 0;
}
if (!avfmt)
error("Failed avformat_alloc_context()");
- if (size > 2048) {
+ if (IO_FLAT) {
+ seekable = 1;
+ io_buffer_size = size;
+ } else if (size > 2048) {
int flags;
char extension[64];