diff options
author | Mike Klein <mtklein@chromium.org> | 2018-04-11 13:53:52 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2018-04-11 18:45:47 +0000 |
commit | ac78c7f415c20377f697a4fce42cb6572e24782b (patch) | |
tree | 995094edb59ce474d2ea849edca218a6b278ae4a /third_party | |
parent | ed5e069dbb0b2ef49e22b9d17af3875e3682cd61 (diff) |
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>
Diffstat (limited to 'third_party')
-rw-r--r-- | third_party/skcms/src/ICCProfile.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/third_party/skcms/src/ICCProfile.c b/third_party/skcms/src/ICCProfile.c index b4ee20bc13..42c942b58f 100644 --- a/third_party/skcms/src/ICCProfile.c +++ b/third_party/skcms/src/ICCProfile.c @@ -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. |