Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FreeRDP/FreeRDP.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'libfreerdp/gdi/gfx.c')
-rw-r--r--libfreerdp/gdi/gfx.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/libfreerdp/gdi/gfx.c b/libfreerdp/gdi/gfx.c
index 3dcf2cba8..21daeb36d 100644
--- a/libfreerdp/gdi/gfx.c
+++ b/libfreerdp/gdi/gfx.c
@@ -1411,6 +1411,9 @@ static UINT gdi_CacheToSurface(RdpgfxClientContext* context,
const RECTANGLE_16 rect = { destPt->x, destPt->y, destPt->x + cacheEntry->width,
destPt->y + cacheEntry->height };
+ if (rectangle_is_empty(&rect))
+ continue;
+
if (!is_rect_valid(&rect, surface->width, surface->height))
goto fail;