diff options
author | Michiel <code@m01.eu> | 2019-05-05 20:24:16 +0100 |
---|---|---|
committer | Simon Ser <contact@emersion.fr> | 2019-05-13 23:30:38 +0300 |
commit | a68c7c0c8d741074f60fb5ab9d2d2ff0841c6e3e (patch) | |
tree | 62f8446289122e1c2aa48a19c5e6b3002cbd6888 /backend | |
parent | 03346cb28f13a9f67549e37431725a10066b966b (diff) |
Fixes #1689 RDP RemoteFX crash
When using the rdp backend and connecting with xfreerdp ... --rfx, wlroots
crashes in backend/rdp/output.c while attempting to realloc(..., 0).
This commit guards against that and instead returns true, resulting in
no rfx message being sent. This prevents the crash and appears to work, but
it's not obvious if this is correct from a specification perspective.
Diffstat (limited to 'backend')
-rw-r--r-- | backend/rdp/output.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/backend/rdp/output.c b/backend/rdp/output.c index 5e20dda4..0ca886f0 100644 --- a/backend/rdp/output.c +++ b/backend/rdp/output.c @@ -79,6 +79,9 @@ static bool output_attach_render(struct wlr_output *wlr_output, static bool rfx_swap_buffers( struct wlr_rdp_output *output, pixman_region32_t *damage) { + if (!pixman_region32_not_empty(damage)) { + return true; + } struct wlr_rdp_peer_context *context = output->context; freerdp_peer *peer = context->peer; rdpUpdate *update = peer->update; |