Avoid assert on nonsense input
Fixes oss-fuzz 69439. Credit to OSS-Fuzz for finding the case. Change-Id: I5211900073377c7bdccb904dbc6ff172419e76f1 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io> Reviewed-by: Robert Löhning <robert.loehning@qt.io> (cherry picked from commit 913cc91c0abb8087a85984930049f208965b05c9) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
parent
aabaf64c25
commit
9dcedc184c
@ -1935,7 +1935,7 @@ bool fromIccProfile(const QByteArray &data, QColorSpace *colorSpace)
|
||||
QColorSpacePrivate *colorspaceDPtr = QColorSpacePrivate::get(*colorSpace);
|
||||
|
||||
colorspaceDPtr->isPcsLab = (header.pcs == uint(Tag::Lab_));
|
||||
if (tagIndex.contains(Tag::cicp)) {
|
||||
if (tagIndex.contains(Tag::cicp) && header.inputColorSpace == uint(ColorSpaceType::Rgb)) {
|
||||
// Let cicp override nLut profiles if we fully recognize it.
|
||||
if (parseCicp(data, tagIndex[Tag::cicp], colorspaceDPtr))
|
||||
threeComponentMatrix = true;
|
||||
|
Loading…
x
Reference in New Issue
Block a user