summaryrefslogtreecommitdiffstats
path: root/src/plugins/imageformats/jpeg
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@qt.io>2020-07-09 13:30:03 +0200
committerSona Kurazyan <sona.kurazyan@qt.io>2020-08-27 18:58:20 +0200
commit50661a9558ca3fe93bf569cc572b0fb2def5589d (patch)
tree6cf8e3d1bbfd4867db5fc79959b0c3df1a20a97a /src/plugins/imageformats/jpeg
parentf48dba06650801c5678ae89adfc14b1cc3209da9 (diff)
Change QByteArray to handle large arrays
Use qsizetype throughout. Change-Id: I787af7fcfa17e1be87decb64c41c609cc24be117 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Oliver Wolff <oliver.wolff@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/plugins/imageformats/jpeg')
-rw-r--r--src/plugins/imageformats/jpeg/qjpeghandler.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/plugins/imageformats/jpeg/qjpeghandler.cpp b/src/plugins/imageformats/jpeg/qjpeghandler.cpp
index 7574d1ca00..72d932445e 100644
--- a/src/plugins/imageformats/jpeg/qjpeghandler.cpp
+++ b/src/plugins/imageformats/jpeg/qjpeghandler.cpp
@@ -516,7 +516,7 @@ static inline void write_icc_profile(const QImage &image, j_compress_ptr cinfo)
const int markers = (iccProfile.size() + (maxIccMarkerSize - 1)) / maxIccMarkerSize;
Q_ASSERT(markers < 256);
for (int marker = 1; marker <= markers; ++marker) {
- const int len = std::min(iccProfile.size() - index, maxIccMarkerSize);
+ const int len = qMin(iccProfile.size() - index, maxIccMarkerSize);
const QByteArray block = iccSignature
+ QByteArray(1, char(marker)) + QByteArray(1, char(markers))
+ iccProfile.mid(index, len);