mirror of
https://invent.kde.org/frameworks/kimageformats.git
synced 2025-06-03 17:08:08 -04:00
xcf: Fix crash on malformed files
This commit is contained in:
parent
23e9fec869
commit
51921e8ee5
@ -1672,7 +1672,7 @@ bool XCFImageFormat::assignImageBytes(Layer &layer, uint i, uint j, const GimpPr
|
||||
for (int y = 0; y < height; y++) {
|
||||
uchar *dataPtr = bits + y * bytesPerLine;
|
||||
uchar *alphaPtr = nullptr;
|
||||
if (!layer.alpha_tiles.isEmpty()) {
|
||||
if (layer.alpha_tiles.size() > j && layer.alpha_tiles.at(j).size() > i) {
|
||||
QImage &alphaTile = layer.alpha_tiles[j][i];
|
||||
if (alphaTile.width() >= width && alphaTile.height() > y) {
|
||||
alphaPtr = alphaTile.scanLine(y);
|
||||
|
Loading…
x
Reference in New Issue
Block a user