diff options
author | Robert Löhning <robert.loehning@qt.io> | 2021-06-07 19:42:19 +0200 |
---|---|---|
committer | Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> | 2021-06-08 19:10:06 +0000 |
commit | c58d691938803148b98f820b5c1a8f4742966e92 (patch) | |
tree | 57d6ea48ff87a6e0f095187ac52d237716606a9e | |
parent | a5273d4e56f1438da26f2cf7c10d430099fe3a00 (diff) |
QIcc: Update test for invalid values
This should have happened when changing the code in
f493d41722fc76a04f699ea26128fdf3d215d913
Fixes oss-fuzz issue 31633.
Change-Id: I7945c3f90651f8fa04df20fbaf0b0c7f68619407
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
(cherry picked from commit 7661fdce0a1a502b1d2f6a89b0d89234b12aabb9)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
-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 2e6d295ce5..cfc1312c9b 100644 --- a/src/gui/painting/qicc.cpp +++ b/src/gui/painting/qicc.cpp @@ -742,7 +742,7 @@ bool fromIccProfile(const QByteArray &data, QColorSpace *colorSpace) QColorVector whitePoint; if (!parseXyzData(data, tagIndex[Tag::wtpt], whitePoint)) return false; - if (!qFuzzyCompare(whitePoint.y, 1.0f) || (1.0f + whitePoint.z - whitePoint.x) == 0.0f) { + if (!qFuzzyCompare(whitePoint.y, 1.0f) || (1.0f + whitePoint.z + whitePoint.x) == 0.0f) { qCWarning(lcIcc) << "fromIccProfile: Invalid ICC profile - gray white-point not normalized"; return false; } |