https://bugs.winehq.org/show_bug.cgi?id=44550
Bug ID: 44550 Summary: ReactOS ftp.exe: enters endless loop on CTRL-Z Product: Wine Version: unspecified Hardware: x86 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: msvcrt Assignee: wine-bugs@winehq.org Reporter: james_woodcock@yahoo.co.uk Distribution: ---
Created attachment 60509 --> https://bugs.winehq.org/attachment.cgi?id=60509 Proposed fix.
ReactOS ftp.exe uses gets() to get command line input. If the uses pushes CTRL-Z then it enters an endless loop.
Wine's gets() should handle EOF on STDIN in the same way as fgets() - it should return a string if any chars have been read into the buffer, or NULL if the buffer is empty.
I have attached a patch with a proposed fix. I also fixed getws() while I was at it.