mirror of
https://github.com/kotatogram/kotatogram-desktop
synced 2025-09-04 16:45:12 +00:00
More strict check for custom emoji dimensions.
This commit is contained in:
@@ -483,8 +483,7 @@ bool DocumentData::checkWallPaperProperties() {
|
||||
}
|
||||
if (type != FileDocument
|
||||
|| !hasThumbnail()
|
||||
|| !dimensions.width()
|
||||
|| !dimensions.height()
|
||||
|| dimensions.isEmpty()
|
||||
|| dimensions.width() > Storage::kMaxWallPaperDimension
|
||||
|| dimensions.height() > Storage::kMaxWallPaperDimension
|
||||
|| size > Storage::kMaxWallPaperInMemory) {
|
||||
|
@@ -414,7 +414,7 @@ Ui::CustomEmoji::Preview CustomEmojiLoader::preview() {
|
||||
const auto make = [&](not_null<DocumentData*> document) -> Preview {
|
||||
const auto dimensions = document->dimensions;
|
||||
if (!document->inlineThumbnailIsPath()
|
||||
|| !dimensions.width()) {
|
||||
|| dimensions.isEmpty()) {
|
||||
return {};
|
||||
}
|
||||
const auto scale = (FrameSizeFromTag(_tag, _sizeOverride) * 1.)
|
||||
|
Reference in New Issue
Block a user