cmd: Fix cmd's mishandling of quote-enclosed command strings
Wilbert Ho
wilbert.ho at gmail.com
Fri Jul 16 06:16:26 CDT 2010
cmd mishandles quote-enclosed command strings because the leading
quote is included in the string when wine searches through the
built-in commands (dir is a builtin, but "dir is not).
$ ./wine cmd.exe /c "dir README"
wine: cannot find L"C:\\windows\\system32\\dir.exe"
File not found
To fix this, offset the string being compared to the array of builtins
by the number of leading quotes before doing the comparison.
---
programs/cmd/tests/test_builtins.cmd | 7 +++++++
programs/cmd/tests/test_builtins.cmd.exp | 8 ++++++++
programs/cmd/wcmdmain.c | 18 ++++++++++++++----
3 files changed, 29 insertions(+), 4 deletions(-)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-cmd-Fix-cmd-s-mishandling-of-quote-enclosed-command-.patch
Type: text/x-patch
Size: 3099 bytes
Desc: not available
URL: <http://www.winehq.org/pipermail/wine-patches/attachments/20100716/6b48017c/attachment-0001.bin>
More information about the wine-patches
mailing list