From 2378b989ffe8560b7dd31bf2138a254259d6d5a3 Mon Sep 17 00:00:00 2001 From: roman-b Date: Sun, 21 Aug 2011 04:09:13 +0300 Subject: [PATCH] channel/rail: fix Server Get Application ID Response PDU receiving. It is a possible error in MS-RDPERP 2.2.2.8.1. --- channels/rail/rail_orders.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/channels/rail/rail_orders.c b/channels/rail/rail_orders.c index d6fad3170..d5ce003d4 100644 --- a/channels/rail/rail_orders.c +++ b/channels/rail/rail_orders.c @@ -190,8 +190,13 @@ void rail_read_server_get_appid_resp_order(STREAM* s, RAIL_GET_APPID_RESP_ORDER* { stream_read_uint32(s, get_appid_resp->windowId); /* windowId (4 bytes) */ - get_appid_resp->applicationId.length = 256; - stream_read(s, get_appid_resp->applicationId.string, 256); /* applicationId (256 bytes) */ + 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) */ } void rail_read_langbar_info_order(STREAM* s, RAIL_LANGBAR_INFO_ORDER* langbar_info)