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:
matt335672
2025-04-24 16:34:15 +01:00
parent 44acc46db4
commit 554515e39c
7 changed files with 27 additions and 32 deletions
+1 -1
View File
@@ -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;