summaryrefslogtreecommitdiff
path: root/testing/libfuzzer
diff options
context:
space:
mode:
Diffstat (limited to 'testing/libfuzzer')
-rw-r--r--testing/libfuzzer/pdf_codec_icc_fuzzer.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/testing/libfuzzer/pdf_codec_icc_fuzzer.cc b/testing/libfuzzer/pdf_codec_icc_fuzzer.cc
index c7abdd69a4..7021017953 100644
--- a/testing/libfuzzer/pdf_codec_icc_fuzzer.cc
+++ b/testing/libfuzzer/pdf_codec_icc_fuzzer.cc
@@ -9,7 +9,8 @@
extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
CCodec_IccModule icc_module;
uint32_t nComponent = 0;
- void* transform = icc_module.CreateTransform_sRGB(data, size, nComponent);
+ std::unique_ptr<CLcmsCmm> transform =
+ icc_module.CreateTransform_sRGB(data, size, &nComponent);
if (transform) {
float src[4];
@@ -17,8 +18,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
for (int i = 0; i < 4; i++)
src[i] = 0.5f;
icc_module.SetComponents(nComponent);
- icc_module.Translate(transform, src, dst);
- icc_module.DestroyTransform(transform);
+ icc_module.Translate(transform.get(), src, dst);
}
return 0;