qt5base-lts/tests/auto/gui/image
Lars Knoll c4d8734c50 Avoid out of bounds memory reads when scaling images
The calculation of the width/height required for the
scaling algorithm was prone to floating point rounding
issues, where the lower value got rounded down, the higher
one rounded up. This could lead to a situation where we
iterated over one more line/pixel in the line than we have
in the source image.

Correct this by passing the dimension of the source image into
the function and bounds checking the values before iterating.

Task-number: QTBUG-35927
Change-Id: If44b2235a479224660d508a0504fec40d724763a
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
2014-03-28 22:52:19 +01:00
..
qicoimageformat QtGui tests: Remove DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 2013-03-27 03:54:42 +01:00
qicon Remove qSort usages from gui tests 2014-02-20 08:10:19 +01:00
qimage Avoid out of bounds memory reads when scaling images 2014-03-28 22:52:19 +01:00
qimageiohandler QtGui tests: Remove DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 2013-03-27 03:54:42 +01:00
qimagereader Remove qSort usages from gui tests 2014-02-20 08:10:19 +01:00
qimagewriter Remove qSort usages from gui tests 2014-02-20 08:10:19 +01:00
qmovie QtGui tests: Remove DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 2013-03-27 03:54:42 +01:00
qpicture QtGui tests: Remove DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 2013-03-27 03:54:42 +01:00
qpixmap WinRT: Fix various test compilations 2013-10-02 12:36:05 +02:00
qpixmapcache QtGui tests: Remove DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 2013-03-27 03:54:42 +01:00
image.pro Check for network module when building according auto tests 2013-02-19 19:20:53 +01:00