Fixed #6112: Segfault in update_decompress_brush

The iterators need to be signed for the loop check to work.
This commit is contained in:
akallabeth 2020-04-23 11:52:16 +02:00
parent 3a06ce058f
commit a73adecaf4

View File

@ -2497,10 +2497,10 @@ BOOL update_write_cache_glyph_v2_order(wStream* s, const CACHE_GLYPH_V2_ORDER* c
}
static BOOL update_decompress_brush(wStream* s, BYTE* output, size_t outSize, BYTE bpp)
{
UINT32 x, y, k;
INT32 x, y, k;
BYTE byte = 0;
const BYTE* palette = Stream_Pointer(s) + 16;
const UINT32 bytesPerPixel = ((bpp + 1) / 8);
const INT32 bytesPerPixel = ((bpp + 1) / 8);
if (!Stream_SafeSeek(s, 16ULL + 7ULL * bytesPerPixel)) // 64 / 4
return FALSE;