summaryrefslogtreecommitdiffstats
path: root/src/gui/painting
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@qt.io>2017-08-29 15:08:59 +0200
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2017-08-29 13:56:59 +0000
commit789f9d0d56204354652760fcde407b30b3b3aded (patch)
tree2198fc862215115df22978402ac34b3a964604c0 /src/gui/painting
parent63002b2f378e8b663276279fb304afa752171bee (diff)
Avoid assert on large clips in qt_alphamapblit_generic
It is (end - start) that represent the number of pixels being worked on and needs to be smaller than the buffer size. Change-Id: I75a22bc2656ac1c7d231278c3a1931758090f8ce Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io> Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
Diffstat (limited to 'src/gui/painting')
-rw-r--r--src/gui/painting/qdrawhelper.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gui/painting/qdrawhelper.cpp b/src/gui/painting/qdrawhelper.cpp
index 5c6c91f0ba..c78fdfe62e 100644
--- a/src/gui/painting/qdrawhelper.cpp
+++ b/src/gui/painting/qdrawhelper.cpp
@@ -5627,7 +5627,7 @@ static void qt_alphamapblit_generic(QRasterBuffer *rasterBuffer,
int start = qMax<int>(x, clip.x);
int end = qMin<int>(x + mapWidth, clip.x + clip.len);
- Q_ASSERT(clip.len <= buffer_size);
+ Q_ASSERT(end - start <= buffer_size);
QRgba64 *dest = destFetch64((QRgba64*)buffer, rasterBuffer, start, clip.y, end - start);
for (int xp=start; xp<end; ++xp) {
@@ -5900,7 +5900,7 @@ static void qt_alphargbblit_generic(QRasterBuffer *rasterBuffer,
int start = qMax<int>(x, clip.x);
int end = qMin<int>(x + mapWidth, clip.x + clip.len);
- Q_ASSERT(clip.len <= buffer_size);
+ Q_ASSERT(end - start <= buffer_size);
QRgba64 *dest = destFetch64((QRgba64*)buffer, rasterBuffer, start, clip.y, end - start);
for (int xp=start; xp<end; ++xp) {