psd: Fix crash on fuzzed file

oss-fuzz/12752
This commit is contained in:
Albert Astals Cid 2019-01-29 10:53:30 +01:00
parent f61d64e0e5
commit ac725cca68

View File

@ -177,6 +177,10 @@ static bool LoadPSD(QDataStream &stream, const PSDHeader &header, QImage &img)
QRgb *image_data = reinterpret_cast<QRgb*>(img.bits());
if (!image_data) {
return false;
}
static const channelUpdater updaters[4] = {
updateRed,
updateGreen,