From ac725cca68dd2b446f15091e4d0765af8be8fafc Mon Sep 17 00:00:00 2001 From: Albert Astals Cid Date: Tue, 29 Jan 2019 10:53:30 +0100 Subject: [PATCH] psd: Fix crash on fuzzed file oss-fuzz/12752 --- src/imageformats/psd.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/imageformats/psd.cpp b/src/imageformats/psd.cpp index 2eac3a4..85f3aeb 100644 --- a/src/imageformats/psd.cpp +++ b/src/imageformats/psd.cpp @@ -177,6 +177,10 @@ static bool LoadPSD(QDataStream &stream, const PSDHeader &header, QImage &img) QRgb *image_data = reinterpret_cast(img.bits()); + if (!image_data) { + return false; + } + static const channelUpdater updaters[4] = { updateRed, updateGreen,