Path: csiph.com!usenet.pasdenom.info!gegeweb.org!eternal-september.org!feeder.eternal-september.org!mx05.eternal-september.org!.POSTED!not-for-mail From: Steven Simpson Newsgroups: comp.lang.java.programmer Subject: Re: exec problem is JDK 1.7.0_21 Date: Sat, 27 Apr 2013 09:22:08 +0100 Organization: A noiseless patient Spider Lines: 28 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit Injection-Info: mx05.eternal-september.org; posting-host="847c23adf71594bde0de355f9bb56936"; logging-data="27585"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+nYc5URJrxyn2iwArGyC0Ud/lqhmEZbec=" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130329 Thunderbird/17.0.5 In-Reply-To: Cancel-Lock: sha1:0rYAWHJoxUDkxBSEhUd1I/Oa5Mc= Xref: csiph.com comp.lang.java.programmer:23667 On 26/04/13 18:17, Sven Köhler wrote: > Am 24.04.2013 12:26, schrieb Steven Simpson: >> Is the program using CommandLineToArgvW incorrectly? Are there any >> other input strings to try? > I tested > test(L"foo.exe \"ab\\\"c\\\\\" def"); > test(L"\"foo.exe\" \"ab\\\"c\\\\\" def"); > end then it works. Confirmed. I tried all my cases with a prefixed token, and they started working too. > Apparently, the first token (which is the program > name, and can be assumed not to contain any backslashes and quotes) is > treated differently from all subsequent tokens. Well, the first token can contain backslashes, but they are taken literally. > So CommandLineToArgvW does allow for escaping quotes within the arguments. I take it all back. -- ss at comp dot lancs dot ac dot uk