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

Unified Diff: testing/libfuzzer/pdf_cfx_saxreader_fuzzer.cc

Issue 2451493002: Refcount all the IFX_ stream classes all the time. (Closed)
Patch Set: Clean up cast expression Created 4 years 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 | « fpdfsdk/fsdk_define.h ('k') | testing/libfuzzer/xfa_codec_fuzzer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: testing/libfuzzer/pdf_cfx_saxreader_fuzzer.cc
diff --git a/testing/libfuzzer/pdf_cfx_saxreader_fuzzer.cc b/testing/libfuzzer/pdf_cfx_saxreader_fuzzer.cc
index 63d0e3c75dc069170a304b15d7c319d9fd431bf0..94decbfc2c58c4d4819584a0e061c6fa6219cee0 100644
--- a/testing/libfuzzer/pdf_cfx_saxreader_fuzzer.cc
+++ b/testing/libfuzzer/pdf_cfx_saxreader_fuzzer.cc
@@ -16,17 +16,14 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
if (!stream)
return 0;
- std::unique_ptr<IFX_SeekableReadStream,
- ReleaseDeleter<IFX_SeekableReadStream>>
- fileRead(stream->MakeSeekableReadStream());
+ CFX_RetainPtr<IFX_SeekableReadStream> fileRead =
+ stream->MakeSeekableReadStream();
if (!fileRead)
return 0;
CFX_SAXReader reader;
- if (reader.StartParse(fileRead.get(), 0, -1, CFX_SaxParseMode_NotSkipSpace) <
- 0) {
+ if (reader.StartParse(fileRead, 0, -1, CFX_SaxParseMode_NotSkipSpace) < 0)
return 0;
- }
while (1) {
int32_t ret = reader.ContinueParse(nullptr);
« no previous file with comments | « fpdfsdk/fsdk_define.h ('k') | testing/libfuzzer/xfa_codec_fuzzer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698