From 50a4e190b4456f342f3106d8e0cc5087f4e2ea6c Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Thu, 2 Mar 2023 12:03:40 +0100 Subject: src/anim-atlas: fix bitmask undefined read --- src/anim-atlas.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/anim-atlas.cpp b/src/anim-atlas.cpp index c6193b5b..27051db7 100644 --- a/src/anim-atlas.cpp +++ b/src/anim-atlas.cpp @@ -158,6 +158,7 @@ void anim_atlas::make_bitmask_(const ImageView2D& tex, BitArray& array) (unsigned char)(buf[7*4] >= amin) << 7); dest[dst_idx] = value; } + dest[(height-j-1)*width+i >> 3] = 0; for (; i < width; i++) { unsigned char alpha = data[(j*stride + i*4)+3]; -- cgit v1.2.3