summaryrefslogtreecommitdiff
path: root/testing
diff options
context:
space:
mode:
authorNicolas Pena <npm@chromium.org>2017-07-12 11:04:12 -0400
committerChromium commit bot <commit-bot@chromium.org>2017-07-12 18:26:43 +0000
commit58bf3de718e510648ee136c887be5b2d577644a7 (patch)
treefceba4f29df5fc6ecf4da1cf41d6bae0cdda05d2 /testing
parent071f5eda0399d6f260cc1b67beffcdaa315a9af7 (diff)
downloadpdfium-58bf3de718e510648ee136c887be5b2d577644a7.tar.xz
Cleanup ICC code part 1
This CL switches void* to CLcmsCmm*, simplifies the ownership and destruction of CLcmsCmm, and reduces unnecessary function calling in fx_codec_icc.cpp. Change-Id: Ifdbf59dcdaede497d1684b161dd066726cf08ee3 Reviewed-on: https://pdfium-review.googlesource.com/7590 Reviewed-by: dsinclair <dsinclair@chromium.org> Commit-Queue: Nicolás Peña <npm@chromium.org>
Diffstat (limited to 'testing')
-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;