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

Side by Side Diff: third_party/qcms/src/iccread.c

Issue 2224023002: Fix unitialized data field in QCMS (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: forgot actual fuzzer file Created 4 years, 4 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 | « third_party/qcms/README.chromium ('k') | ui/gfx/BUILD.gn » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* vim: set ts=8 sw=8 noexpandtab: */ 1 /* vim: set ts=8 sw=8 noexpandtab: */
2 // qcms 2 // qcms
3 // Copyright (C) 2009 Mozilla Foundation 3 // Copyright (C) 2009 Mozilla Foundation
4 // Copyright (C) 1998-2007 Marti Maria 4 // Copyright (C) 1998-2007 Marti Maria
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 1144 matching lines...) Expand 10 before | Expand all | Expand 10 after
1155 return floor(a*256.f + .5f); 1155 return floor(a*256.f + .5f);
1156 } 1156 }
1157 1157
1158 static struct curveType *curve_from_gamma(float gamma) 1158 static struct curveType *curve_from_gamma(float gamma)
1159 { 1159 {
1160 struct curveType *curve; 1160 struct curveType *curve;
1161 int num_entries = 1; 1161 int num_entries = 1;
1162 curve = malloc(sizeof(struct curveType) + sizeof(uInt16Number)*num_entri es); 1162 curve = malloc(sizeof(struct curveType) + sizeof(uInt16Number)*num_entri es);
1163 if (!curve) 1163 if (!curve)
1164 return NULL; 1164 return NULL;
1165 curve->type = CURVE_TYPE;
1165 curve->count = num_entries; 1166 curve->count = num_entries;
1166 curve->data[0] = float_to_u8Fixed8Number(gamma); 1167 curve->data[0] = float_to_u8Fixed8Number(gamma);
1167 return curve; 1168 return curve;
1168 } 1169 }
1169 1170
1170 1171
1171 //XXX: it would be nice if we had a way of ensuring 1172 //XXX: it would be nice if we had a way of ensuring
1172 // everything in a profile was initialized regardless of how it was created 1173 // everything in a profile was initialized regardless of how it was created
1173 1174
1174 //XXX: should this also be taking a black_point? 1175 //XXX: should this also be taking a black_point?
(...skipping 461 matching lines...) Expand 10 before | Expand all | Expand 10 after
1636 { 1637 {
1637 qcms_profile *profile = NULL; 1638 qcms_profile *profile = NULL;
1638 FILE *file = _wfopen(path, L"rb"); 1639 FILE *file = _wfopen(path, L"rb");
1639 if (file) { 1640 if (file) {
1640 profile = qcms_profile_from_file(file); 1641 profile = qcms_profile_from_file(file);
1641 fclose(file); 1642 fclose(file);
1642 } 1643 }
1643 return profile; 1644 return profile;
1644 } 1645 }
1645 #endif 1646 #endif
OLDNEW
« no previous file with comments | « third_party/qcms/README.chromium ('k') | ui/gfx/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698