
According to MS-RDPESC the smart card channel must set the IoStatus to an NTSTATUS in case a encoding or decoding error happens. The smart card channel did this correctly but the output stream was modified incorrectly causing the smart card remote manager to stop in error cases.