[Bug 47790] putty.exe displays an error at startup when placed in a path with accented characters.

WineHQ Bugzilla wine-bugs at winehq.org
Fri Oct 4 23:16:20 CDT 2019


https://bugs.winehq.org/show_bug.cgi?id=47790

Jeff Smith <whydoubt at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |whydoubt at gmail.com

--- Comment #2 from Jeff Smith <whydoubt at gmail.com> ---
This seems to result from the intersection of two issues.

1st is how the raw command line is altered by the wine loader
If 'putty.exe' is entered at the command line (or 'wine64 putty.exe' for wine),
GetCommandLineA() returns...
- Windows cmd: 'putty.exe'
- Windows powershell: '"C:\Users\Jeff\Téléchargements\putty.exe"'
- wine: 'Z:\home\jeff\Téléchargements\putty.exe'

2nd is how the first argument of the command line is stripped out and passed
into WinMain.  I am not sure if mingw is used to compile putty for release, but
the behaviour does match mingw in that characters >0x7f (along with characters
<= 0x20) not contained in quotes are treated as the end of the first arg.
What gets delivered to WinMain:
  Windows cmd: ''
  Windows powershell: ''
  wine: 'léchargements\putty.exe'

So when run with wine, putty is effectively passed 'léchargements\putty.exe' as
a command-line argument.  Then putty attempts to treat it as a host name,
leading to the warning message box.

Note that with #2, an offending character _anywhere_ in the command name
provided to Windows cmd will cause essentially the same failure.

-- 
Do not reply to this email, post in Bugzilla using the
above URL to reply.
You are receiving this mail because:
You are watching all bug changes.


More information about the wine-bugs mailing list