summaryrefslogtreecommitdiffstats
path: root/libxrdp/xrdp_sec.c
diff options
context:
space:
mode:
authorIdan Freiberg <speidy@gmail.com>2017-01-15 08:55:00 +0200
committerGitHub <noreply@github.com>2017-01-15 08:55:00 +0200
commita64e1789c561b6376ff643e43578410c1927b49e (patch)
treee8c4478741535cfd0417dd87df61f736f8ffaee6 /libxrdp/xrdp_sec.c
parent9f5656933b057bf5c47ae46716130226f8352901 (diff)
parent0a5bc44a0bd8100be3592bc155cf4b28ccb9cd17 (diff)
downloadxrdp-proprietary-a64e1789c561b6376ff643e43578410c1927b49e.tar.gz
xrdp-proprietary-a64e1789c561b6376ff643e43578410c1927b49e.zip
Merge pull request #615 from speidy/channels_fixes
Channels improvements
Diffstat (limited to 'libxrdp/xrdp_sec.c')
-rw-r--r--libxrdp/xrdp_sec.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/libxrdp/xrdp_sec.c b/libxrdp/xrdp_sec.c
index 06813d25..422acfe2 100644
--- a/libxrdp/xrdp_sec.c
+++ b/libxrdp/xrdp_sec.c
@@ -1829,12 +1829,12 @@ xrdp_sec_process_mcs_data_channels(struct xrdp_sec *self, struct stream *s)
client_info = &(self->rdp_layer->client_info);
- DEBUG(("processing channels, channel_code is %d", client_info->channel_code));
+ DEBUG(("processing channels, channels_allowed is %d", client_info->channels_allowed));
/* this is an option set in xrdp.ini */
- if (client_info->channel_code != 1) /* are channels on? */
+ if (client_info->channels_allowed != 1) /* are channels on? */
{
- g_writeln("Processing channel data from client - The channel is off");
+ g_writeln("xrdp_sec_process_mcs_data_channels: all channels are disabled by configuration");
return 0;
}
@@ -1862,6 +1862,12 @@ xrdp_sec_process_mcs_data_channels(struct xrdp_sec *self, struct stream *s)
return 1;
}
in_uint8a(s, channel_item->name, 8);
+ if (g_strlen(channel_item->name) == 0)
+ {
+ log_message(LOG_LEVEL_WARNING, "xrdp_sec_process_mcs_data_channels: got an empty channel name, ignoring it");
+ g_free(channel_item);
+ continue;
+ }
in_uint32_le(s, channel_item->flags);
channel_item->chanid = MCS_GLOBAL_CHANNEL + (index + 1);
list_add_item(self->mcs_layer->channel_list, (tintptr) channel_item);