qt6-bb10/src/gui/image
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
..
image.pri Add AVX2 autovectorized versions of premultiply 2015-03-10 12:28:13 +00:00
qbitmap.cpp Update copyright headers 2015-02-11 06:49:51 +00:00
qbitmap.h QtGui: Use Q_NULLPTR instead of 0 in all public headers 2015-07-19 10:32:55 +00:00
qbmphandler.cpp Crash fix: reject certain malformed bmp images 2016-02-05 04:14:35 +00:00
qbmphandler_p.h Update copyright headers 2015-02-11 06:49:51 +00:00
qgifhandler.cpp QtGui: Use QImage::constBits()/constScanLine() in non-const contexts. 2016-02-13 08:17:00 +00:00
qgifhandler.pri fix build with no built-in image handlers 2015-08-03 14:13:58 +00:00
qgifhandler_p.h Update copyright headers 2015-02-11 06:49:51 +00:00
qicon.cpp Optimize qt_findAtNxFile by reducing the amount of allocations 2015-12-07 16:56:37 +00:00
qicon.h Make qt_findAtNxFile return the source device pixel ratio 2015-11-13 15:05:12 +00:00
qicon_p.h Add ability for QIcons to be marked as template images. 2015-07-09 10:53:17 +00:00
qiconengine.cpp Fix build error with ICC 16 on Windows 2015-09-21 16:39:36 +00:00
qiconengine.h Fix build error with ICC 16 on Windows 2015-09-21 16:39:36 +00:00
qiconengineplugin.cpp Update copyright headers 2015-02-11 06:49:51 +00:00
qiconengineplugin.h QtGui: Use Q_NULLPTR instead of 0 in all public headers 2015-07-19 10:32:55 +00:00
qiconloader.cpp Do not support static QIcon instances 2015-07-09 10:53:29 +00:00
qiconloader_p.h QIconLoader: don't make QIconDirInfo::type a bit-field 2015-07-19 15:59:49 +00:00
qimage.cpp Fix possible crash in QImage::pixel() 2016-03-31 08:54:03 +00:00
qimage.h Make public headers compile with -Wzero-as-null-pointer-constant 2016-02-19 16:37:33 +00:00
qimage_avx2.cpp Add AVX2 autovectorized versions of premultiply 2015-03-10 12:28:13 +00:00
qimage_compat.cpp Update copyright headers 2015-02-11 06:49:51 +00:00
qimage_conversions.cpp Use Q_CONSTRUCTOR_FUNCTION instead of doing the same manually 2015-12-17 13:47:26 +00:00
qimage_mips_dspr2.cpp Update copyright headers 2015-02-11 06:49:51 +00:00
qimage_mips_dspr2_asm.S Update copyright headers 2015-02-11 06:49:51 +00:00
qimage_neon.cpp Add AArch64 ASM to qimage_neon.cpp 2015-11-26 16:46:06 +00:00
qimage_p.h Fix possible crash in QImage::pixel() 2016-03-31 08:54:03 +00:00
qimage_sse2.cpp Optimize generic conversion and remove now obsolete direct conversions 2015-02-13 13:20:52 +00:00
qimage_sse4.cpp Revert "Remove separate SSE4 unpremultiply function" 2015-04-23 09:25:28 +00:00
qimage_ssse3.cpp QtGui: Fix const correctness in old style casts 2015-03-12 04:23:50 +00:00
qimageiohandler.cpp Optionally apply orientation on QImage read 2015-05-12 09:25:11 +00:00
qimageiohandler.h QtGui: Use Q_NULLPTR instead of 0 in all public headers 2015-07-19 10:32:55 +00:00
qimagepixmapcleanuphooks.cpp Update copyright headers 2015-02-11 06:49:51 +00:00
qimagepixmapcleanuphooks_p.h Update copyright headers 2015-02-11 06:49:51 +00:00
qimagereader.cpp Reduce allocations by using reserve() 2016-02-07 16:50:26 +00:00
qimagereader.h Export gamma setting and metadata in QImageReader 2015-06-22 12:22:37 +00:00
qimagewriter.cpp QImageIOHandler: don't create QLists just to count their elements 2015-07-13 10:37:15 +00:00
qimagewriter.h Optionally apply orientation on QImage read 2015-05-12 09:25:11 +00:00
qjpeghandler.cpp Add AArch64 ASM to qimage_neon.cpp 2015-11-26 16:46:06 +00:00
qjpeghandler.pri fix build with no built-in image handlers 2015-08-03 14:13:58 +00:00
qjpeghandler_p.h Update copyright headers 2015-02-11 06:49:51 +00:00
qmovie.cpp Update copyright headers 2015-02-11 06:49:51 +00:00
qmovie.h QtGui: Use Q_NULLPTR instead of 0 in all public headers 2015-07-19 10:32:55 +00:00
qnativeimage.cpp Update copyright headers 2015-02-11 06:49:51 +00:00
qnativeimage_p.h Update copyright headers 2015-02-11 06:49:51 +00:00
qpaintengine_pic.cpp Merge remote-tracking branch 'origin/5.5' into dev 2015-07-01 11:05:26 +02:00
qpaintengine_pic_p.h Update copyright headers 2015-02-11 06:49:51 +00:00
qpicture.cpp Enable non-integer device pixel ratio 2015-07-30 04:04:01 +00:00
qpicture.h QtGui: Use Q_NULLPTR instead of 0 in all public headers 2015-07-19 10:32:55 +00:00
qpicture_p.h QPicture: don't hold images in QList 2015-06-24 13:23:13 +00:00
qpictureformatplugin.cpp Update copyright headers 2015-02-11 06:49:51 +00:00
qpictureformatplugin.h QtGui: Use Q_NULLPTR instead of 0 in all public headers 2015-07-19 10:32:55 +00:00
qpixmap.cpp QPixmap: check data ptr in isQBitmap() 2016-02-24 12:13:56 +00:00
qpixmap.h QtGui: Use Q_NULLPTR instead of 0 in all public headers 2015-07-19 10:32:55 +00:00
qpixmap_blitter.cpp QtGui: Use QImage::constBits()/constScanLine() in non-const contexts. 2016-02-13 08:17:00 +00:00
qpixmap_blitter_p.h Update copyright headers 2015-02-11 06:49:51 +00:00
qpixmap_raster.cpp Use backing store formats with alpha 2016-01-08 19:08:43 +00:00
qpixmap_raster_p.h Update copyright headers 2015-02-11 06:49:51 +00:00
qpixmap_win.cpp QtGui: Use QImage::constBits()/constScanLine() in non-const contexts. 2016-02-13 08:17:00 +00:00
qpixmapcache.cpp Prevent the pixmap cache from crashing if it's been destroyed 2015-10-23 00:16:01 +00:00
qpixmapcache.h Mark QPixmapCache::Key as shared for Qt 6. 2015-07-18 13:32:43 +00:00
qpixmapcache_p.h Update copyright headers 2015-02-11 06:49:51 +00:00
qplatformpixmap.cpp Update copyright headers 2015-02-11 06:49:51 +00:00
qplatformpixmap.h Update copyright headers 2015-02-11 06:49:51 +00:00
qpnghandler.cpp Get rid of QT_USE_BUNDLED_LIBPNG 2015-11-23 18:52:35 +00:00
qpnghandler.pri Introduce png_dependency.pri 2015-11-13 20:42:12 +00:00
qpnghandler_p.h Update copyright headers 2015-02-11 06:49:51 +00:00
qppmhandler.cpp QtGui: Use QImage::constBits()/constScanLine() in non-const contexts. 2016-02-13 08:17:00 +00:00
qppmhandler_p.h Update copyright headers 2015-02-11 06:49:51 +00:00
qxbmhandler.cpp QtGui: Use QImage::constBits()/constScanLine() in non-const contexts. 2016-02-13 08:17:00 +00:00
qxbmhandler_p.h Update copyright headers 2015-02-11 06:49:51 +00:00
qxpmhandler.cpp QtGui: Use QImage::constBits()/constScanLine() in non-const contexts. 2016-02-13 08:17:00 +00:00
qxpmhandler_p.h Update copyright headers 2015-02-11 06:49:51 +00:00