[Bug 10618] dll/kernel32/process. c build_argv returns incorrect argv array for a given command line string

wine-bugs at winehq.org wine-bugs at winehq.org
Fri Nov 30 20:09:12 CST 2007


http://bugs.winehq.org/show_bug.cgi?id=10618





--- Comment #2 from Darragh Bailey <felix at compsoc.nuigalway.ie>  2007-11-30 20:09:12 ---

Looking at the first loop in build_argv demonstrates the problem perfectly.

Everything is working fine up until it starts to look at the following string
'S', 'E', 'T', 'U', 'P', 'E', 'X', 'E', 'P', 'A', 'T', 'H', '=', '"', 'C', ':',
'\', 'w', 'i', 'n', 'd', 'o', 'w', 's', '\', 't', 'e', 'm', 'p', '\', 'I', 'X',
'P', '0', '3', '1', '.', 'T', 'M', 'P', '\', '"', ' ',  

At the point it reaches the following characters '\', '"', ' ',
argc=5, in_quotes=1 & bcount=0

loop on '\' causes bcount=1
loop on '"' the causes the following line of code to evaluate as false
} else if ((*s=='"') && ((bcount & 1)==0)) {

As a result in_quotes remains at 1 and it doesn't recognise the end of the
argument on the space in the following loop.

Looks like it needs an improved test to determine when it has in fact
encountered an escaped quote.


-- 
Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching all bug changes.



More information about the wine-bugs mailing list