Description
BytesRead is uninitialized and passed to DosReadFile. DosReadFile uses it in while(*BytesRead <Count), leading to incorrect evaluation of the loop condition.
The patch initialized BytesRead to zero, as it is supposed to be updated inside the DosReadFile depending on the bytes read.