Fixed #6200: Arraysize check

(cherry picked from commit 06c48df0dfd228646fed00c554a20ae9bcaa5e5e)
This commit is contained in:
Armin Novak 2020-05-19 19:32:42 +02:00 committed by akallabeth
parent 87bca1088a
commit c6bcfb0736

View File

@ -2548,7 +2548,7 @@ static CACHE_BRUSH_ORDER* update_read_cache_brush_order(rdpUpdate* update, wStre
Stream_Read_UINT8(s, cache_brush->index); /* cacheEntry (1 byte) */
Stream_Read_UINT8(s, iBitmapFormat); /* iBitmapFormat (1 byte) */
if (iBitmapFormat > ARRAYSIZE(BMF_BPP))
if (iBitmapFormat >= ARRAYSIZE(BMF_BPP))
goto fail;
cache_brush->bpp = BMF_BPP[iBitmapFormat];