PCXHandler::write: Properly fail if the image is too big

This commit is contained in:
Albert Astals Cid 2021-08-12 16:43:26 +02:00
parent fbeef559b7
commit a8f92e5525

View File

@ -618,8 +618,12 @@ bool PCXHandler::write(const QImage &image)
QImage img = image; QImage img = image;
int w = img.width(); const int w = img.width();
int h = img.height(); const int h = img.height();
if (w > 65536 || h > 65536) {
return false;
}
// qDebug() << "Width: " << w; // qDebug() << "Width: " << w;
// qDebug() << "Height: " << h; // qDebug() << "Height: " << h;