mirror of
https://invent.kde.org/frameworks/kimageformats.git
synced 2025-06-03 17:08:08 -04:00
XCF: fix crash
This commit is contained in:
parent
145dedf360
commit
8588c053b6
@ -1974,6 +1974,12 @@ static bool convertFloatTo16Bit(uchar *output, quint64 outputSize, uchar *input)
|
||||
*/
|
||||
bool XCFImageFormat::loadLevel(QDataStream &xcf_io, Layer &layer, qint32 bpp, const GimpPrecision precision)
|
||||
{
|
||||
auto bpc = bytesPerChannel(precision);
|
||||
if ((bpc == 0) || (bpp % bpc)) {
|
||||
qCDebug(XCFPLUGIN) << "XCF: the stream seems corrupted";
|
||||
return false;
|
||||
}
|
||||
|
||||
qint32 width;
|
||||
qint32 height;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user