Refactor static channel name handling
1) Remove 'magic numbers' related to static channel name lengths, and replace with CHANNEL_NAME_LEN, or CHANNEL_NAME_LEN+1, as appropriate. 2) Always add static channel definitions, even if they are malformed. 3) Log channels which the client sends, which aren't named in the [Channels] section of xrdp.ini. (cherry picked from commit 9092d898b7dceda713bd05b296ea8e8213ee614b)
This commit is contained in:
@@ -1800,7 +1800,7 @@ lfreerdp_pre_connect(freerdp *instance)
|
||||
int num_chans;
|
||||
int target_chan;
|
||||
int ch_flags;
|
||||
char ch_name[256];
|
||||
char ch_name[CHANNEL_NAME_LEN + 1];
|
||||
const char *ch_names[MAX_FREERDP_CHANNELS];
|
||||
char *dst_ch_name;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user