From 522ed14ce8cf39e5e6fc1a58099edd4f849b7fb8 Mon Sep 17 00:00:00 2001 From: kcwu Date: Mon, 17 Oct 2016 06:37:25 -0700 Subject: lcms: Revise previous cmsStageAllocMatrix fix Also fixed wrong patch file name. This is fixup of 958e57cb and d2023170 TEST=apply this change in lcms' repo and make check BUG=chromium:651849,chromium:654198 Review-Url: https://codereview.chromium.org/2424803002 --- .../0009-cmsStageAllocMatrix-param-swap.patch | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 third_party/lcms2-2.6/0009-cmsStageAllocMatrix-param-swap.patch (limited to 'third_party/lcms2-2.6/0009-cmsStageAllocMatrix-param-swap.patch') diff --git a/third_party/lcms2-2.6/0009-cmsStageAllocMatrix-param-swap.patch b/third_party/lcms2-2.6/0009-cmsStageAllocMatrix-param-swap.patch new file mode 100644 index 0000000000..26db3dd223 --- /dev/null +++ b/third_party/lcms2-2.6/0009-cmsStageAllocMatrix-param-swap.patch @@ -0,0 +1,20 @@ +diff --git a/third_party/lcms2-2.6/src/cmslut.c b/third_party/lcms2-2.6/src/cmslut.c +index 73e6726..9b0eb4b 100644 +--- a/third_party/lcms2-2.6/src/cmslut.c ++++ b/third_party/lcms2-2.6/src/cmslut.c +@@ -414,13 +414,13 @@ cmsStage* CMSEXPORT cmsStageAllocMatrix(cmsContext ContextID, cmsUInt32Number R + + if (Offset != NULL) { + +- NewElem ->Offset = (cmsFloat64Number*) _cmsCalloc(ContextID, Cols, sizeof(cmsFloat64Number)); ++ NewElem ->Offset = (cmsFloat64Number*) _cmsCalloc(ContextID, Rows, sizeof(cmsFloat64Number)); + if (NewElem->Offset == NULL) { + MatrixElemTypeFree(NewMPE); + return NULL; + } + +- for (i=0; i < Cols; i++) { ++ for (i=0; i < Rows; i++) { + NewElem ->Offset[i] = Offset[i]; + } + -- cgit v1.2.3