Fix crash when using RDP4 security
The initialization of the freerdp_peer was done too early.
This fixes https://bugs.freedesktop.org/show_bug.cgi?id=91390.
Acked-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
diff --git a/src/compositor-rdp.c b/src/compositor-rdp.c
index 70d290b..4ef0dd1 100644
--- a/src/compositor-rdp.c
+++ b/src/compositor-rdp.c
@@ -1090,8 +1090,6 @@
peerCtx = (RdpPeerContext *) client->context;
peerCtx->rdpBackend = b;
- client->Initialize(client);
-
settings = client->settings;
/* configure security settings */
if (b->rdp_key)
@@ -1104,6 +1102,8 @@
}
settings->NlaSecurity = FALSE;
+ client->Initialize(client);
+
settings->OsMajorType = OSMAJORTYPE_UNIX;
settings->OsMinorType = OSMINORTYPE_PSEUDO_XSERVER;
settings->ColorDepth = 32;
@@ -1113,6 +1113,7 @@
settings->FrameMarkerCommandEnabled = TRUE;
settings->SurfaceFrameMarkerEnabled = TRUE;
+
client->Capabilities = xf_peer_capabilities;
client->PostConnect = xf_peer_post_connect;
client->Activate = xf_peer_activate;