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

Side by Side Diff: core/src/fxcodec/lcms2/lcms2-2.6/src/cmslut.c

Issue 387273002: Fix uninitialized Storage in _LUTeval16 (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 6 years, 5 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 //------------------------------------------------------------------------------ --- 1 //------------------------------------------------------------------------------ ---
2 // 2 //
3 // Little Color Management System 3 // Little Color Management System
4 // Copyright (c) 1998-2012 Marti Maria Saguer 4 // Copyright (c) 1998-2012 Marti Maria Saguer
5 // 5 //
6 // Permission is hereby granted, free of charge, to any person obtaining 6 // Permission is hereby granted, free of charge, to any person obtaining
7 // a copy of this software and associated documentation files (the "Software"), 7 // a copy of this software and associated documentation files (the "Software"),
8 // to deal in the Software without restriction, including without limitation 8 // to deal in the Software without restriction, including without limitation
9 // the rights to use, copy, modify, merge, publish, distribute, sublicense, 9 // the rights to use, copy, modify, merge, publish, distribute, sublicense,
10 // and/or sell copies of the Software, and to permit persons to whom the Softwar e 10 // and/or sell copies of the Software, and to permit persons to whom the Softwar e
(...skipping 1261 matching lines...) Expand 10 before | Expand all | Expand 10 after
1272 } 1272 }
1273 } 1273 }
1274 1274
1275 1275
1276 // Default to evaluate the LUT on 16 bit-basis. Precision is retained. 1276 // Default to evaluate the LUT on 16 bit-basis. Precision is retained.
1277 static 1277 static
1278 void _LUTeval16(register const cmsUInt16Number In[], register cmsUInt16Number Ou t[], register const void* D) 1278 void _LUTeval16(register const cmsUInt16Number In[], register cmsUInt16Number Ou t[], register const void* D)
1279 { 1279 {
1280 cmsPipeline* lut = (cmsPipeline*) D; 1280 cmsPipeline* lut = (cmsPipeline*) D;
1281 cmsStage *mpe; 1281 cmsStage *mpe;
1282 cmsFloat32Number Storage[2][MAX_STAGE_CHANNELS]; 1282 cmsFloat32Number Storage[2][MAX_STAGE_CHANNELS] = {0.0f};
1283 int Phase = 0, NextPhase; 1283 int Phase = 0, NextPhase;
1284 1284
1285 From16ToFloat(In, &Storage[Phase][0], lut ->InputChannels); 1285 From16ToFloat(In, &Storage[Phase][0], lut ->InputChannels);
1286 1286
1287 for (mpe = lut ->Elements; 1287 for (mpe = lut ->Elements;
1288 mpe != NULL; 1288 mpe != NULL;
1289 mpe = mpe ->Next) { 1289 mpe = mpe ->Next) {
1290 1290
1291 NextPhase = Phase ^ 1; 1291 NextPhase = Phase ^ 1;
1292 mpe ->EvalPtr(&Storage[Phase][0], &Storage[NextPhase][0], mpe); 1292 mpe ->EvalPtr(&Storage[Phase][0], &Storage[NextPhase][0], mpe);
(...skipping 491 matching lines...) Expand 10 before | Expand all | Expand 10 after
1784 // Some clipping.... 1784 // Some clipping....
1785 for (j=0; j < 3; j++) { 1785 for (j=0; j < 3; j++) {
1786 if (x[j] < 0) x[j] = 0; 1786 if (x[j] < 0) x[j] = 0;
1787 else 1787 else
1788 if (x[j] > 1.0) x[j] = 1.0; 1788 if (x[j] > 1.0) x[j] = 1.0;
1789 } 1789 }
1790 } 1790 }
1791 1791
1792 return TRUE; 1792 return TRUE;
1793 } 1793 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698