skcms→9334796 reject non-XYZ/Lab PCS profiles

Change-Id: I6dd917c1f090a18e6508b0391f119f8f91929162
Reviewed-on: https://skia-review.googlesource.com/120502
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Mike Klein <mtklein@chromium.org>
This commit is contained in:
Mike Klein 2018-04-11 13:53:52 -04:00 committed by Skia Commit-Bot
parent ed5e069dbb
commit ac78c7f415

View File

@ -703,6 +703,11 @@ bool skcms_Parse(const void* buf, size_t len, skcms_ICCProfile* profile) {
}
}
if (profile->pcs != make_signature('X', 'Y', 'Z', ' ') &&
profile->pcs != make_signature('L', 'a', 'b', ' ')) {
return false;
}
bool pcs_is_xyz = profile->pcs == make_signature('X', 'Y', 'Z', ' ');
// Pre-parse commonly used tags.