qt5base-lts/tests/auto/gui/image/qimage
Eskil Abrahamsen Blomfeldt a4e2f2e687 Fix possible crash in QImage::pixel()
QImage::pixel() assumed that the color table was valid
for the values in the bitmap. This was always wrong
for indexed images with explicit no color table set and
was wrong for mono images that were constructed from
preexisting data.

For mono images, we default to a black/white color table,
like we do when constructing with uninitialized data.

For indexed image, we always default to no color table,
but instead of crashing in pixel(), we warn and return
an undefined value.

[ChangeLog][QtGui][Image] Fixed possible crash in QImage::pixel()
for mono or indexed images.

Change-Id: Ieaf19c03984badddfd06e1855a7e287b862adc70
Task-number: QTBUG-50745
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
2016-03-31 08:54:03 +00:00
..
images Add test for invalid exif data 2015-07-17 11:37:02 +00:00
.gitignore Moved gui autotests into new directory structure 2011-09-01 10:59:49 +02:00
qimage.pro Android: Fix qimage test. 2015-01-08 10:09:39 +01:00
qimage.qrc Android: Fix qimage test. 2015-01-08 10:09:39 +01:00
tst_qimage.cpp Fix possible crash in QImage::pixel() 2016-03-31 08:54:03 +00:00