You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Nov 1, 2021. It is now read-only.
When using the rdp backend and connecting with xfreerdp ... --rfx, wlroots crashes in backend/rdp/output.c on this line:
RFX_RECT *rfx_rect;
int nrects;
pixman_box32_t *rects =
pixman_region32_rectangles(damage, &nrects);
rfx_rect = realloc(context->rfx_rects, nrects * sizeof(*rfx_rect)); // << here
Using gdb, it looks like this is because damage contains x=0, y=0, width=0 and height=0, probably because the screen didn't change. This means nrects is also 0 and we request a realloc of size 0.
(note about log: I added an extra line for logging to backend/rdp/output.c, which is why the line number above is off by one. The extra logging doesn't show when running sway because I didn't change the log level)
If the fix is just to return true if there aren't any rects to send (and thus not call rfx_compose_message), then I can file a PR for that. That seems to fix this crash. I don't understand the RDP protocol or freeRDP well enough to know whether this is the correct fix though.
Summary
When using the
rdp
backend and connecting withxfreerdp ... --rfx
, wlroots crashes inbackend/rdp/output.c
on this line:Using
gdb
, it looks like this is becausedamage
contains x=0, y=0, width=0 and height=0, probably because the screen didn't change. This meansnrects
is also 0 and we request arealloc
of size 0.Repro & logs
terminal 1:
(note about log: I added an extra line for logging to
backend/rdp/output.c
, which is why the line number above is off by one. The extra logging doesn't show when runningsway
because I didn't change the log level)terminal 2:
Workaround
use
--nsc
instead of--rfx
System info
OS: Arch Linux
wlroots-git: 6ae6b5d
sway-git: 51c077798cf06ebd5e27271fb5e276c181f8a077
The text was updated successfully, but these errors were encountered: