mirror of
https://invent.kde.org/frameworks/kimageformats.git
synced 2025-05-28 00:30:23 -04:00
pcx: Fix crash on fuzzed file
oss-fuzz/12784
This commit is contained in:
parent
4ee92527c4
commit
c2d2a9be66
@ -253,6 +253,9 @@ static void readImage1(QImage &img, QDataStream &s, const PCXHEADER &header)
|
||||
img = QImage(header.width(), header.height(), QImage::Format_Mono);
|
||||
img.setColorCount(2);
|
||||
|
||||
if (img.isNull())
|
||||
return;
|
||||
|
||||
for (int y = 0; y < header.height(); ++y) {
|
||||
if (s.atEnd()) {
|
||||
img = QImage();
|
||||
|
Loading…
Reference in New Issue
Block a user