mirror of
https://invent.kde.org/frameworks/kimageformats.git
synced 2025-05-28 00:30:23 -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);
|
||||
|
||||
if (_zsize == 0 )
|
||||
return false;
|
||||
|
||||
if (_zsize == 2 || _zsize == 4) {
|
||||
img = img.convertToFormat(QImage::Format_ARGB32);
|
||||
} else if (_zsize > 4) {
|
||||
|
Loading…
Reference in New Issue
Block a user