diff --git a/common/ms-rdpbcgr.h b/common/ms-rdpbcgr.h index ad81d0df..03e03c39 100644 --- a/common/ms-rdpbcgr.h +++ b/common/ms-rdpbcgr.h @@ -74,8 +74,11 @@ #define CONNECTION_TYPE_LAN 0x06 #define CONNECTION_TYPE_AUTODETECT 0x07 -/* Virtual channel options */ -/* Channel Definition Structure: options (2.2.1.3.4.1) */ +/* Channel definition structure CHANNEL_DEF (2.2.1.3.4.1) */ +/* This isn't explicitly named in MS-RDPBCGR */ +#define CHANNEL_NAME_LEN 7 + +/* Oprions field */ /* NOTE: XR_ prefixed to avoid conflict with FreeRDP */ #define XR_CHANNEL_OPTION_INITIALIZED 0x80000000 #define XR_CHANNEL_OPTION_ENCRYPT_RDP 0x40000000 diff --git a/sesman/chansrv/chansrv.c b/sesman/chansrv/chansrv.c index c154f684..d7ef1869 100644 --- a/sesman/chansrv/chansrv.c +++ b/sesman/chansrv/chansrv.c @@ -39,7 +39,8 @@ #include "xrdp_sockets.h" #include "audin.h" -#define CHANNEL_NAME_BYTES 7 +#include "ms-rdpbcgr.h" + #define MAX_PATH 260 static struct trans *g_lis_trans = 0; @@ -1047,10 +1048,10 @@ my_api_trans_data_in(struct trans *trans) int ver; struct chansrv_drdynvc_procs procs; /* - * Name is limited to CHANNEL_NAME_BYTES for an SVC, or MAX_PATH + * Name is limited to CHANNEL_NAME_LEN for an SVC, or MAX_PATH * bytes for a DVC */ - char chan_name[MAX(CHANNEL_NAME_BYTES, MAX_PATH) + 1]; + char chan_name[MAX(CHANNEL_NAME_LEN, MAX_PATH) + 1]; unsigned int channel_name_bytes; //g_writeln("my_api_trans_data_in: extra_flags %d", trans->extra_flags);