https://bugs.winehq.org/show_bug.cgi?id=48486
Bug ID: 48486 Summary: cmd WCMD_ReadAndParseLine contains non-null terminated strings, causing garbage output in trace logs Product: Wine Version: 5.0-rc6 Hardware: x86 OS: Linux Status: NEW Severity: trivial Priority: P2 Component: cmd Assignee: wine-bugs@winehq.org Reporter: focht@gmx.net Distribution: ---
Hello folks,
as it says. It's already PE but various strings have not been converted yet. The function in the summary is the one most offending/annoying in trace logs. There are other occurrences as well.
Example download:
https://github.com/git-for-windows/git/releases/download/v2.25.0.windows.1/G...
--- snip --- ... 006a:Call KERNEL32.MultiByteToWideChar(000001b5,00000000,00bd7a78 "\t\t@IF NOT EXIST bin\rebase.exe @(\n\t\t\t@IF NOT EXIST bin @MKDIR bin\n\t\t\t@COPY usr\bin\rebase.exe bin\rebase.exe\n\t\t)\n\t\t@IF NOT EXIST bin\msys-2.0.dll @(\n\t\t\t@COPY usr\bin\msys-2.0.dll bin\msys-2.0.dll\n\t\t)\n\t\t@bin\rebase.exe -b 0x64000000 usr\bin\msys-2.0.dll\n"...,00000021,00be5238,00002000) ret=00401a09 006a:Ret KERNEL32.MultiByteToWideChar() retval=00000021 ret=00401a09 006a:Call KERNEL32.HeapFree(00110000,00000000,00bd7a78) ret=00401a22 006a:Ret KERNEL32.HeapFree() retval=00000001 ret=00401a22 006a:Call msvcrt.wcschr(00be523c L"@IF NOT EXIST bin\rebase.exe @(",00000025) ret=004137f3 006a:Ret msvcrt.wcschr() retval=00000000 ret=004137f3 006a:Call KERNEL32.CompareStringW(00000400,00001001,00be523e L"IF NOT EXIST bin\rebase.exe @(",00000003,0041b706 L"remforifelse\4357\444d\525f\6165\4164\646e\6150\7372\4c65\6e69e\6f4e\6320\6d6f\616d\646e\6e20\726f\6820\6e61\6c64\2065\7573\7070\696c\6465\necho.echo:echo/\764f\7265\6c66\776f\6420\7465\6365\6574\2064\6e69\6320\6d6f\616d\646e\ndo/I",00000003) ret=00411489 006a:Ret KERNEL32.CompareStringW() retval=00000001 ret=00411489 006a:Call KERNEL32.CompareStringW(00000400,00001001,00be523e L"IF NOT EXIST bin\rebase.exe @(",00000003,0041b70c L"forifelse\4357\444d\525f\6165\4164\646e\6150\7372\4c65\6e69e\6f4e\6320\6d6f\616d\646e\6e20\726f\6820\6e61\6c64\2065\7573\7070\696c\6465\necho.echo:echo/\764f\7265\6c66\776f\6420\7465\6365\6574\2064\6e69\6320\6d6f\616d\646e\ndo/I",00000003) ret=004115c0 006a:Ret KERNEL32.CompareStringW() retval=00000003 ret=004115c0 006a:Call KERNEL32.CompareStringW(00000400,00001001,00be523e L"IF NOT EXIST bin\rebase.exe @(",00000002,0041b712 L"ifelse\4357\444d\525f\6165\4164\646e\6150\7372\4c65\6e69e\6f4e\6320\6d6f\616d\646e\6e20\726f\6820\6e61\6c64\2065\7573\7070\696c\6465\necho.echo:echo/\764f\7265\6c66\776f\6420\7465\6365\6574\2064\6e69\6320\6d6f\616d\646e\ndo/I",00000002) ret=004115fa 006a:Ret KERNEL32.CompareStringW() retval=00000002 ret=004115fa ... --- snip ---
Wine source:
https://source.winehq.org/git/wine.git/blob/02f3a133b64ed1f979309e1399738eaa...
$ sha1sum Git-2.25.0-32-bit.exe 7dc64019c089d4a9a3700ee7140a7af9a5416199 Git-2.25.0-32-bit.exe
$ du -sh Git-2.25.0-32-bit.exe 45M Git-2.25.0-32-bit.exe
$ wine --version wine-5.0-rc6
Regards
https://bugs.winehq.org/show_bug.cgi?id=48486
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- URL| |https://github.com/git-for- | |windows/git/releases/downlo | |ad/v2.25.0.windows.1/Git-2. | |25.0-32-bit.exe Keywords| |download
https://bugs.winehq.org/show_bug.cgi?id=48486
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- URL|https://github.com/git-for- |https://web.archive.org/web |windows/git/releases/downlo |/20200207000132/https://git |ad/v2.25.0.windows.1/Git-2. |hub.com/git-for-windows/git |25.0-32-bit.exe |/releases/download/v2.25.0. | |windows.1/Git-2.25.0-32-bit | |.exe
--- Comment #1 from Anastasius Focht focht@gmx.net --- Hello folks,
adding stable link via Internet Archive:
https://web.archive.org/web/20200207000132/https://github.com/git-for-window...
You need to wait a few seconds if it says "Got an HTTP 302 response at crawl time". It will still resolve to the artifact snapshot.
$ wine --version wine-6.0-rc6
Regards
https://bugs.winehq.org/show_bug.cgi?id=48486
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Fixed by SHA1| |0bf71745f0df0181844be37afb6 | |c0975a6ccb2f3 Resolution|--- |FIXED Status|NEW |RESOLVED
--- Comment #2 from Anastasius Focht focht@gmx.net --- Hello folks,
this is fixed by commit https://source.winehq.org/git/wine.git/commitdiff/0bf71745f0df0181844be37afb... ("cmd: Use terminated strings.").
Thanks Gijs
$ wine --version wine-6.6-149-g39263558a20
Regards
https://bugs.winehq.org/show_bug.cgi?id=48486
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #3 from Alexandre Julliard julliard@winehq.org --- Closing bugs fixed in 6.7.