diff options
author | Lei Zhang <thestig@chromium.org> | 2017-08-23 16:26:38 -0700 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2017-08-24 21:12:16 +0000 |
commit | 8ada2ef8000abce4eb98506cc6195c78067f1000 (patch) | |
tree | 467cf4e58e4f6e8bbac91dc72eb2d905f37b71bf /testing | |
parent | 664d4b82ac5156488b7e437d4cc54a3ef94d2811 (diff) | |
download | pdfium-chromium/3196.tar.xz |
Fix some nits in XFACodecFuzzer.chromium/3196
Change-Id: Ia9738e14d90a813b6ec7abd72843248fd3a3bff0
Reviewed-on: https://pdfium-review.googlesource.com/11910
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'testing')
-rw-r--r-- | testing/libfuzzer/xfa_codec_fuzzer.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/testing/libfuzzer/xfa_codec_fuzzer.h b/testing/libfuzzer/xfa_codec_fuzzer.h index 88227c91a9..0d6b43e7b8 100644 --- a/testing/libfuzzer/xfa_codec_fuzzer.h +++ b/testing/libfuzzer/xfa_codec_fuzzer.h @@ -28,7 +28,7 @@ class XFACodecFuzzer { std::unique_ptr<CCodec_ProgressiveDecoder> decoder = mgr->CreateProgressiveDecoder(); - CFX_RetainPtr<Reader> source(new Reader(data, size)); + auto source = pdfium::MakeRetain<Reader>(data, size); FXCODEC_STATUS status = decoder->LoadImageInfo(source, type, nullptr, true); if (status != FXCODEC_STATUS_FRAME_READY) return 0; @@ -38,8 +38,9 @@ class XFACodecFuzzer { int32_t frames; if (decoder->GetFrames(frames) != FXCODEC_STATUS_DECODE_READY || - frames == 0) + frames == 0) { return 0; + } status = decoder->StartDecode(bitmap, 0, 0, bitmap->GetWidth(), bitmap->GetHeight()); @@ -71,7 +72,7 @@ class XFACodecFuzzer { private: const uint8_t* const m_data; - size_t m_size; + const size_t m_size; }; }; |