mirror of
https://invent.kde.org/frameworks/kimageformats.git
synced 2025-07-19 12:14:20 -04:00
pcx: Fix crash on fuzzed file
oss-fuzz/12784
This commit is contained in:
@ -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();
|
||||
|
Reference in New Issue
Block a user