Fix some nits in XFACodecFuzzer.
Change-Id: Ia9738e14d90a813b6ec7abd72843248fd3a3bff0
Reviewed-on: https://pdfium-review.googlesource.com/11910
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
diff --git a/testing/libfuzzer/xfa_codec_fuzzer.h b/testing/libfuzzer/xfa_codec_fuzzer.h
index 88227c9..0d6b43e 100644
--- a/testing/libfuzzer/xfa_codec_fuzzer.h
+++ b/testing/libfuzzer/xfa_codec_fuzzer.h
@@ -28,7 +28,7 @@
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 @@
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 @@
private:
const uint8_t* const m_data;
- size_t m_size;
+ const size_t m_size;
};
};