From c6bcfb0736834be867a746f6f4dc345a47de4fb9 Mon Sep 17 00:00:00 2001 From: Armin Novak Date: Tue, 19 May 2020 19:32:42 +0200 Subject: [PATCH] Fixed #6200: Arraysize check (cherry picked from commit 06c48df0dfd228646fed00c554a20ae9bcaa5e5e) --- libfreerdp/core/orders.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libfreerdp/core/orders.c b/libfreerdp/core/orders.c index bac9dc113..e053bd480 100644 --- a/libfreerdp/core/orders.c +++ b/libfreerdp/core/orders.c @@ -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];