mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-24 07:05:35 +00:00
Check for invalid data
This commit is contained in:
@@ -26,7 +26,7 @@ final class SoftwareAnimationRenderer: ASDisplayNode, AnimationRenderer {
|
||||
guard let baseAddress = bytes.baseAddress else {
|
||||
return
|
||||
}
|
||||
if bytesPerRow * height > bytes.count {
|
||||
if bytesPerRow <= 0 || height <= 0 || width <= 0 || bytesPerRow * height > bytes.count {
|
||||
assert(false)
|
||||
return
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user