All accesses to g_drdynvcs[] in chansrv.c have been checked for unbounded access.
The code in xrdp_channel.c to handle dechunking on a virtual channel is moved to a separate module to allow for better sharing of logic.