2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-08-31 14:45:14 +00:00

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

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);