diff options
author | Allan Sandfeld Jensen <[email protected]> | 2024-06-21 13:40:37 +0200 |
---|---|---|
committer | Allan Sandfeld Jensen <[email protected]> | 2024-07-18 14:50:31 +0000 |
commit | 913cc91c0abb8087a85984930049f208965b05c9 (patch) | |
tree | 5b0ea2cd25289990ae67bb4d6553b4d544a07c80 | |
parent | 1aedd4d7c9968054a1c2880000a5007bb826a179 (diff) |
Avoid assert on nonsense input
Fixes oss-fuzz 69439. Credit to OSS-Fuzz for finding the case.
Pick-to: 6.8
Change-Id: I5211900073377c7bdccb904dbc6ff172419e76f1
Reviewed-by: Laszlo Agocs <[email protected]>
Reviewed-by: Robert Löhning <[email protected]>
-rw-r--r-- | src/gui/painting/qicc.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gui/painting/qicc.cpp b/src/gui/painting/qicc.cpp index d62d4627cb8..dc13a44eb7c 100644 --- a/src/gui/painting/qicc.cpp +++ b/src/gui/painting/qicc.cpp @@ -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; |