diff --git a/channels/rail/rail_orders.c b/channels/rail/rail_orders.c index d5ce003d4..2727eec9f 100644 --- a/channels/rail/rail_orders.c +++ b/channels/rail/rail_orders.c @@ -189,14 +189,10 @@ void rail_read_server_localmovesize_order(STREAM* s, RAIL_LOCALMOVESIZE_ORDER* l void rail_read_server_get_appid_resp_order(STREAM* s, RAIL_GET_APPID_RESP_ORDER* get_appid_resp) { stream_read_uint32(s, get_appid_resp->windowId); /* windowId (4 bytes) */ + stream_read(s, &get_appid_resp->applicationIdBuffer[0], 512); /* applicationId (256 UNICODE chars) */ get_appid_resp->applicationId.length = 512; - if (get_appid_resp->applicationId.string == NULL) - { - get_appid_resp->applicationId.string = xmalloc( - get_appid_resp->applicationId.length); - } - stream_read(s, get_appid_resp->applicationId.string, 512); /* applicationId (256 UNICODE chars) */ + get_appid_resp->applicationId.string = &get_appid_resp->applicationIdBuffer[0]; } void rail_read_langbar_info_order(STREAM* s, RAIL_LANGBAR_INFO_ORDER* langbar_info) diff --git a/include/freerdp/rail.h b/include/freerdp/rail.h index 121f79bee..915cfcbc0 100644 --- a/include/freerdp/rail.h +++ b/include/freerdp/rail.h @@ -297,6 +297,7 @@ struct _RAIL_GET_APPID_RESP_ORDER { uint32 windowId; UNICODE_STRING applicationId; + uint8 applicationIdBuffer[512]; }; typedef struct _RAIL_GET_APPID_RESP_ORDER RAIL_GET_APPID_RESP_ORDER;