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

Unified Diff: third_party/qcms/src/iccread.c

Issue 2796923002: [qcms] Only accept valid input ranges when reading VCGT formula (Closed)
Patch Set: Fix QCMS tab vs. spaces per usual. Created 3 years, 8 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/qcms/README.chromium ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/qcms/src/iccread.c
diff --git a/third_party/qcms/src/iccread.c b/third_party/qcms/src/iccread.c
index 124506597fc30776dc9a3a4c1db0fe90ad8bf4c0..7dfe995c26d1b6e556f2d292eb58e9b6a5389c91 100644
--- a/third_party/qcms/src/iccread.c
+++ b/third_party/qcms/src/iccread.c
@@ -479,6 +479,12 @@ static qcms_bool read_tag_vcgtType(qcms_profile *profile, struct mem_source *src
if (!src->valid)
goto invalid_vcgt_tag;
+ if (gamma <= 0)
+ goto invalid_vcgt_tag;
+ if (min <= 0 || min > 1.f)
+ goto invalid_vcgt_tag;
+ if (max <= 0 || max > 1.f || min > max)
+ goto invalid_vcgt_tag;
for (j = 0; j < profile->vcgt.length; ++j) {
*dest++ = 65535.f *
« no previous file with comments | « third_party/qcms/README.chromium ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698