Fix crash on invalid image data.

This commit is contained in:
John Preston
2020-05-30 22:37:03 +04:00
parent 4695ebae6e
commit 423ea5b499
6 changed files with 33 additions and 11 deletions
+3
View File
@@ -320,6 +320,9 @@ namespace App {
}
QImage readImage(QByteArray data, QByteArray *format, bool opaque, bool *animated) {
if (data.isEmpty()) {
return QImage();
}
QByteArray tmpFormat;
QImage result;
QBuffer buffer(&data);