Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(97)

Unified Diff: testing/libfuzzer/pdf_streamparser_fuzzer.cc

Issue 2520133002: Remove some WrapUnique() calls by returing unique_ptrs (Closed)
Patch Set: rebase Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « core/fpdfapi/parser/cpdf_parser.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
}
« no previous file with comments | « core/fpdfapi/parser/cpdf_parser.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698