From 959923c63311bd81dcac65f7a03022a8ba2ab901 Mon Sep 17 00:00:00 2001 From: Armin Novak Date: Wed, 2 Jun 2021 17:04:32 +0200 Subject: [PATCH] Fixed codeQL warnings --- libfreerdp/gdi/gfx.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libfreerdp/gdi/gfx.c b/libfreerdp/gdi/gfx.c index 7f8f2a2b8..f68fb3b8b 100644 --- a/libfreerdp/gdi/gfx.c +++ b/libfreerdp/gdi/gfx.c @@ -112,7 +112,7 @@ static UINT gdi_ResetGraphics(RdpgfxClientContext* context, if (!surface) continue; - memset(surface->data, 0xFF, surface->scanline * surface->height); + memset(surface->data, 0xFF, (size_t)surface->scanline * surface->height); if (!surface->outputMapped) continue; @@ -1037,7 +1037,7 @@ static UINT gdi_CreateSurface(RdpgfxClientContext* context, goto fail; } - memset(surface->data, 0xFF, surface->scanline * surface->height); + memset(surface->data, 0xFF, (size_t)surface->scanline * surface->height); surface->outputMapped = FALSE; region16_init(&surface->invalidRegion); rc = context->SetSurfaceData(context, surface->surfaceId, (void*)surface);