mirror of
https://invent.kde.org/frameworks/kimageformats.git
synced 2025-07-18 03:54:18 -04:00
XCF: fix crash (KF5)
This commit is contained in:
committed by
Albert Astals Cid
parent
ec0918d962
commit
f9f29304d8
@ -1976,6 +1976,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;
|
||||
|
||||
|
Reference in New Issue
Block a user