Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(15)

Unified Diff: third_party/lcms2-2.6/src/cmslut.c

Issue 2424803002: lcms: Revise previous cmsStageAllocMatrix fix (Closed)
Patch Set: Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/lcms2-2.6/README.pdfium ('k') | third_party/lcms2-2.6/src/cmstypes.c » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/lcms2-2.6/src/cmslut.c
diff --git a/third_party/lcms2-2.6/src/cmslut.c b/third_party/lcms2-2.6/src/cmslut.c
index 8d5aa60bfb633344114d161d8a5d04881679d637..9b0eb4b54933e33f1fdaac1be0b1ff342306e3d9 100644
--- a/third_party/lcms2-2.6/src/cmslut.c
+++ b/third_party/lcms2-2.6/src/cmslut.c
@@ -391,7 +391,7 @@ cmsStage* CMSEXPORT cmsStageAllocMatrix(cmsContext ContextID, cmsUInt32Number R
if (n >= UINT_MAX / Rows) return NULL;
if (n < Rows || n < Cols) return NULL;
- NewMPE = _cmsStageAllocPlaceholder(ContextID, cmsSigMatrixElemType, Rows, Cols,
+ NewMPE = _cmsStageAllocPlaceholder(ContextID, cmsSigMatrixElemType, Cols, Rows,
EvaluateMatrix, MatrixElemDup, MatrixElemTypeFree, NULL );
if (NewMPE == NULL) return NULL;
@@ -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];
}
« no previous file with comments | « third_party/lcms2-2.6/README.pdfium ('k') | third_party/lcms2-2.6/src/cmstypes.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698