mirror of
https://github.com/aseprite/aseprite.git
synced 2025-01-28 18:32:50 +00:00
Fix crash reading corrupted files with invalid compressed data (fix #4171)
This commit is contained in:
parent
7e331d95e2
commit
6f3e9e21ad
@ -764,7 +764,7 @@ void read_compressed_image_templ(FileInterface* f,
|
||||
size_t uncompressed_bytes = uncompressed.size() - zstream.avail_out;
|
||||
if (uncompressed_bytes > 0) {
|
||||
int i = 0;
|
||||
while (true) {
|
||||
while (y < image->height()) {
|
||||
int n = std::min(uncompressed_bytes, scanline.size() - scanline_offset);
|
||||
if (n > 0) {
|
||||
// Fill the scanline buffer until it's completed
|
||||
|
Loading…
x
Reference in New Issue
Block a user