diff options
author | Jeff Muizelaar <jmuizelaar@mozilla.com> | 2009-06-25 09:31:56 -0400 |
---|---|---|
committer | Jeff Muizelaar <jmuizelaar@mozilla.com> | 2009-07-02 11:22:38 -0400 |
commit | 1eb9d057b991005590448d36b12d70a881def1ad (patch) | |
tree | befa466057106f904e6fd05cf0b117aebdea4067 | |
parent | d2f6ba16c87084f954a19052732271dd8c627427 (diff) |
Check that the profile is an RGB profile before checking if it's bogus
This avoids unitialized reads on non-RGB profiles.
-rw-r--r-- | iccread.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -227,6 +227,10 @@ qcms_bool qcms_profile_is_bogus(qcms_profile *profile) bool negative; unsigned i; + // We currently only check the bogosity of RGB profiles + if (profile->color_space != RGB_SIGNATURE) + return false; + rX = s15Fixed16Number_to_float(profile->redColorant.X); rY = s15Fixed16Number_to_float(profile->redColorant.Y); rZ = s15Fixed16Number_to_float(profile->redColorant.Z); |