mirror of
https://invent.kde.org/frameworks/kimageformats.git
synced 2025-06-03 17:08:08 -04:00
rgb: Fix crash in fuzzed image
An image without color channels makes no sense
This commit is contained in:
parent
7e86e62e86
commit
e45b65e814
@ -316,6 +316,9 @@ bool SGIImage::readImage(QImage &img)
|
|||||||
|
|
||||||
img = QImage(_xsize, _ysize, QImage::Format_RGB32);
|
img = QImage(_xsize, _ysize, QImage::Format_RGB32);
|
||||||
|
|
||||||
|
if (_zsize == 0 )
|
||||||
|
return false;
|
||||||
|
|
||||||
if (_zsize == 2 || _zsize == 4) {
|
if (_zsize == 2 || _zsize == 4) {
|
||||||
img = img.convertToFormat(QImage::Format_ARGB32);
|
img = img.convertToFormat(QImage::Format_ARGB32);
|
||||||
} else if (_zsize > 4) {
|
} else if (_zsize > 4) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user