diff --git a/src/gui/image/qimage_p.h b/src/gui/image/qimage_p.h index f66d268ae05..cdae61698b3 100644 --- a/src/gui/image/qimage_p.h +++ b/src/gui/image/qimage_p.h @@ -110,11 +110,9 @@ QImageData::calculateImageParameters(qsizetype width, qsizetype height, qsizetyp qsizetype dummy; if (qMulOverflow(height, qsizetype(sizeof(uchar *)), &dummy)) return invalid; // why is this here? -#if 1 || QT_VERSION < QT_VERSION_CHECK(6,0,0) // ### can only fix this if QImage dimensions are not int anymore // Disallow images where width * depth calculations might overflow if (width > (INT_MAX - 31) / depth) return invalid; -#endif return { bytes_per_line, total_size }; }