Details
-
Bug
-
Resolution: Fixed
-
Minor
-
None
Description
https://github.com/reactos/reactos/blob/master/dll/win32/shell32/wine/shell32_main.c#L80
Seems the function incorrectly parses sequence of quotes like `abc"""`
I've found it when have run a set of tests:
Specifically these tests has failed:
printargs "0 1"" 2
printargs "0 1""" 2
The printargs utility just simply prints it's own command line:
Piece of code with the fix is here:
The function _get_cmdline_arg_offsets just converts an array of argument indexes into an array of argument offsets in the initial command line.
The actual piece of code which had a bug:
else if (*s == L'"')
|
{
|
quote_count = 0;
|
|
if (!(backslash_count & 1))
|
quote_count++; // unescaped
|
|
s++;
|
backslash_count = 0;
|
|
while (*s == L'"')
|
{
|
quote_count++;
|
s++;
|
}
|
|
if (quote_count & 1) {
|
quote_open = !quote_open;
|
}
|
}
|
Attachments
Issue Links
- is blocked by
-
CORE-19164 Commit 38c0da9 caused 2 more failures in winetest msvcrt:printf
- Untriaged