Commit 616ae155956701f0e8793662c568d19431957be6
1 parent
127859a6
Remove qpdf_read_memory_fuzzer
Showing
3 changed files
with
6 additions
and
18 deletions
ChangeLog
| 1 | +2019-06-18 Jay Berkenbilt <ejb@ql.org> | ||
| 2 | + | ||
| 3 | + * Remove previously submitted qpdf_read_memory_fuzzer as it is a | ||
| 4 | + small subset of qpdf_fuzzer. | ||
| 5 | + | ||
| 1 | 2019-06-15 Jay Berkenbilt <ejb@ql.org> | 6 | 2019-06-15 Jay Berkenbilt <ejb@ql.org> |
| 2 | 7 | ||
| 3 | * Update CI (Azure Pipelines) to run tests with some sanitizers. | 8 | * Update CI (Azure Pipelines) to run tests with some sanitizers. |
fuzz/build.mk
| 1 | # This directory contains support for Google's oss-fuzz project. See | 1 | # This directory contains support for Google's oss-fuzz project. See |
| 2 | # https://github.com/google/oss-fuzz/tree/master/projects/qpdf | 2 | # https://github.com/google/oss-fuzz/tree/master/projects/qpdf |
| 3 | 3 | ||
| 4 | -FUZZERS = \ | ||
| 5 | - qpdf_fuzzer \ | ||
| 6 | - qpdf_read_memory_fuzzer | 4 | +FUZZERS = qpdf_fuzzer |
| 7 | 5 | ||
| 8 | DEFAULT_FUZZ_RUNNER := standalone_fuzz_target_runner | 6 | DEFAULT_FUZZ_RUNNER := standalone_fuzz_target_runner |
| 9 | OBJ_DEFAULT_FUZZ := fuzz/$(OUTPUT_DIR)/$(DEFAULT_FUZZ_RUNNER).$(OBJ) | 7 | OBJ_DEFAULT_FUZZ := fuzz/$(OUTPUT_DIR)/$(DEFAULT_FUZZ_RUNNER).$(OBJ) |
fuzz/qpdf_read_memory_fuzzer.cc deleted
| 1 | -#include "qpdf/qpdf-c.h" | ||
| 2 | - | ||
| 3 | -#include <algorithm> | ||
| 4 | -#include <cstddef> | ||
| 5 | -#include <cstdlib> | ||
| 6 | - | ||
| 7 | -extern "C" int LLVMFuzzerTestOneInput(const unsigned char* data, size_t size) { | ||
| 8 | - const size_t kMaxSize = 64 * 1024; // 64 KiB | ||
| 9 | - size = std::min(size, kMaxSize); | ||
| 10 | - _qpdf_data* qpdf = qpdf_init(); | ||
| 11 | - const char* buffer = reinterpret_cast<const char*>(data); | ||
| 12 | - qpdf_read_memory(qpdf, /*description=*/"", buffer, size, /*password=*/""); | ||
| 13 | - qpdf_cleanup(&qpdf); | ||
| 14 | - return 0; | ||
| 15 | -} |