diff options
author | akallabeth <akallabeth@posteo.net> | 2022-10-21 10:36:46 +0300 |
---|---|---|
committer | David Fort <rdp.effort@gmail.com> | 2022-11-04 16:46:58 +0300 |
commit | 3eccf75affc52f1ea3903be7e2ed1297c9325aba (patch) | |
tree | bdcac2a98948410a395d4a7547b856c4df6b605a | |
parent | 498635a31713754617e675978cffa34d8e660ea9 (diff) |
Skip empty rectangles in gfx cache to surface
-rw-r--r-- | libfreerdp/gdi/gfx.c | 3 |
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; |