summaryrefslogtreecommitdiff
path: root/testing/libfuzzer
diff options
context:
space:
mode:
authortsepez <tsepez@chromium.org>2016-11-21 16:22:10 -0800
committerCommit bot <commit-bot@chromium.org>2016-11-21 16:22:10 -0800
commit06104a8abc71ecd824d6a461b6f6f31c32fd2135 (patch)
tree713f7dfacbdaec5e0ac25e8fe1d197a27453a725 /testing/libfuzzer
parentdc7ec035a6962b788e75f4beaa4cf8fbddd83d39 (diff)
downloadpdfium-06104a8abc71ecd824d6a461b6f6f31c32fd2135.tar.xz
Remove some WrapUnique() calls by returing unique_ptrs
Return these from underlying methods as appropriate. Review-Url: https://codereview.chromium.org/2520133002
Diffstat (limited to 'testing/libfuzzer')
-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;
}