Issue 127107 - Unquoted module name in CreateProcess call
Summary: Unquoted module name in CreateProcess call
Status: CLOSED FIXED
Alias: None
Product: General
Classification: Code
Component: code (show other issues)
Version: 4.1.2
Hardware: PC Windows, all
: P5 (lowest) Normal (vote)
Target Milestone: ---
Assignee: Ariel Constenla-Haile
QA Contact:
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-09-12 19:35 UTC by Ariel Constenla-Haile
Modified: 2016-10-21 14:16 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments
Patch (735 bytes, patch)
2016-09-12 19:37 UTC, Ariel Constenla-Haile
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this issue.
Description Ariel Constenla-Haile 2016-09-12 19:35:31 UTC
According to the MS documentation, calls to CreateProcess must quote the module name in order to avoid ambiguity, see https://msdn.microsoft.com/en-us/library/windows/desktop/ms682425(v=vs.85).aspx 

The lpApplicationName parameter can be NULL. In that case, the module name must be the first white space–delimited token in the lpCommandLine string. If you are using a long file name that contains a space, use quoted strings to indicate where the file name ends and the arguments begin; otherwise, the file name is ambiguous.

One ambiguous CreateProcess call can be found in http://svn.apache.org/viewvc/openoffice/trunk/main/setup_native/source/win32/customactions/shellextensions/registerextensions.cxx?revision=1530306&view=markup#l314
Comment 1 Ariel Constenla-Haile 2016-09-12 19:37:20 UTC
Created attachment 85669 [details]
Patch
Comment 2 Ariel Constenla-Haile 2016-10-21 14:14:16 UTC
Fixed on AOO4143
Comment 3 SVN Robot 2016-10-21 14:15:12 UTC
"arielch" committed SVN revision 1766029 into trunk:
i127107 - Quote module name in CreateProcess call
Comment 4 Ariel Constenla-Haile 2016-10-21 14:16:05 UTC
Closing bug, fix merged on trunk.