From c58d691938803148b98f820b5c1a8f4742966e92 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20L=C3=B6hning?= Date: Mon, 7 Jun 2021 19:42:19 +0200 Subject: [PATCH] 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 (cherry picked from commit 7661fdce0a1a502b1d2f6a89b0d89234b12aabb9) Reviewed-by: Qt Cherry-pick Bot --- src/gui/painting/qicc.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/painting/qicc.cpp b/src/gui/painting/qicc.cpp index 2e6d295ce52..cfc1312c9b1 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; }