Fixed missing value check

This commit is contained in:
Armin Novak 2018-10-16 17:09:29 +02:00
parent c51ca89d9b
commit cab2e28576

View File

@ -2849,6 +2849,10 @@ 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))
goto fail;
cache_brush->bpp = BMF_BPP[iBitmapFormat];
Stream_Read_UINT8(s, cache_brush->cx); /* cx (1 byte) */
Stream_Read_UINT8(s, cache_brush->cy); /* cy (1 byte) */