Index: testing/libfuzzer/pdf_streamparser_fuzzer.cc |
diff --git a/testing/libfuzzer/pdf_streamparser_fuzzer.cc b/testing/libfuzzer/pdf_streamparser_fuzzer.cc |
index a0287c935ac4152bc5126f389eecfe1d29e4cfbd..277acc0a12c435497c565df69c518d944b2f8f53 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; |
} |