summaryrefslogtreecommitdiff
path: root/testing/libfuzzer/pdf_streamparser_fuzzer.cc
diff options
context:
space:
mode:
Diffstat (limited to 'testing/libfuzzer/pdf_streamparser_fuzzer.cc')
-rw-r--r--testing/libfuzzer/pdf_streamparser_fuzzer.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/testing/libfuzzer/pdf_streamparser_fuzzer.cc b/testing/libfuzzer/pdf_streamparser_fuzzer.cc
index a0287c935a..277acc0a12 100644
--- a/testing/libfuzzer/pdf_streamparser_fuzzer.cc
+++ b/testing/libfuzzer/pdf_streamparser_fuzzer.cc
@@ -3,14 +3,15 @@
// found in the LICENSE file.
#include <cstdint>
+#include <memory>
#include "core/fpdfapi/page/pageint.h"
#include "core/fpdfapi/parser/cpdf_object.h"
extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
CPDF_StreamParser parser(data, size);
- while (CPDF_Object* pObj = parser.ReadNextObject(true, 0))
- delete pObj;
+ while (std::unique_ptr<CPDF_Object> pObj = parser.ReadNextObject(true, 0))
+ continue;
return 0;
}