aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorGravatar Brian Osman <brianosman@google.com>2018-04-21 09:40:01 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2018-04-22 14:36:56 +0000
commite03a8ac962ab7b475a213657d39a78f5992f1962 (patch)
treec4d684e4dec63a273a5e4896fbee15f46d279dc2 /src
parent5209d7fce35f4426be86de56aa4a1966c992e6f5 (diff)
Remove assert that color spaces have valid profile data
Chrome fuzzing can trigger this code with malformed profile data (which suggests that the older SkColorSpace::MakeICC allowed some invalid profile data to slip through). In any case, simply returning false to reject the profile is fine. Bug: chromium:835540 Change-Id: Ib675b8e9e3be444ad5dbf8153d60d86284682c90 Reviewed-on: https://skia-review.googlesource.com/122940 Auto-Submit: Brian Osman <brianosman@google.com> Reviewed-by: Mike Klein <mtklein@chromium.org> Commit-Queue: Mike Klein <mtklein@google.com>
Diffstat (limited to 'src')
-rw-r--r--src/core/SkColorSpaceXform_skcms.cpp5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/core/SkColorSpaceXform_skcms.cpp b/src/core/SkColorSpaceXform_skcms.cpp
index 657bf49f24..9eee3935aa 100644
--- a/src/core/SkColorSpaceXform_skcms.cpp
+++ b/src/core/SkColorSpaceXform_skcms.cpp
@@ -64,10 +64,7 @@ bool SkColorSpaceXform_skcms::apply(ColorFormat dstFormat, void* dst,
static bool cs_to_profile(const SkColorSpace* cs, skcms_ICCProfile* profile) {
if (cs->profileData()) {
- bool result = skcms_Parse(cs->profileData()->data(), cs->profileData()->size(), profile);
- // We shouldn't encounter color spaces that were constructed from invalid profiles!
- SkASSERT(result);
- return result;
+ return skcms_Parse(cs->profileData()->data(), cs->profileData()->size(), profile);
}
SkMatrix44 toXYZ;