diff options
Diffstat (limited to 'src/engine/core.cpp')
-rw-r--r-- | src/engine/core.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/engine/core.cpp b/src/engine/core.cpp index 969b94a0..a915dad0 100644 --- a/src/engine/core.cpp +++ b/src/engine/core.cpp | |||
@@ -1050,7 +1050,7 @@ extern "C" HRESULT CoreAppendFileHandleAttachedToCommandLine( | |||
1050 | ExitWithLastError(hr, "Failed to duplicate file handle for attached container."); | 1050 | ExitWithLastError(hr, "Failed to duplicate file handle for attached container."); |
1051 | } | 1051 | } |
1052 | 1052 | ||
1053 | hr = StrAllocFormattedSecure(psczCommandLine, L"%ls -%ls=%u", *psczCommandLine, BURN_COMMANDLINE_SWITCH_FILEHANDLE_ATTACHED, hExecutableFile); | 1053 | hr = StrAllocFormattedSecure(psczCommandLine, L"%ls -%ls=%Iu", *psczCommandLine, BURN_COMMANDLINE_SWITCH_FILEHANDLE_ATTACHED, reinterpret_cast<size_t>(hExecutableFile)); |
1054 | ExitOnFailure(hr, "Failed to append the file handle to the command line."); | 1054 | ExitOnFailure(hr, "Failed to append the file handle to the command line."); |
1055 | 1055 | ||
1056 | *phExecutableFile = hExecutableFile; | 1056 | *phExecutableFile = hExecutableFile; |
@@ -1078,12 +1078,12 @@ extern "C" HRESULT CoreAppendFileHandleSelfToCommandLine( | |||
1078 | hExecutableFile = ::CreateFileW(wzExecutablePath, GENERIC_READ, FILE_SHARE_READ | FILE_SHARE_DELETE, &securityAttributes, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL); | 1078 | hExecutableFile = ::CreateFileW(wzExecutablePath, GENERIC_READ, FILE_SHARE_READ | FILE_SHARE_DELETE, &securityAttributes, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL); |
1079 | if (INVALID_HANDLE_VALUE != hExecutableFile) | 1079 | if (INVALID_HANDLE_VALUE != hExecutableFile) |
1080 | { | 1080 | { |
1081 | hr = StrAllocFormattedSecure(psczCommandLine, L"%ls -%ls=%u", *psczCommandLine, BURN_COMMANDLINE_SWITCH_FILEHANDLE_SELF, hExecutableFile); | 1081 | hr = StrAllocFormattedSecure(psczCommandLine, L"%ls -%ls=%Iu", *psczCommandLine, BURN_COMMANDLINE_SWITCH_FILEHANDLE_SELF, reinterpret_cast<size_t>(hExecutableFile)); |
1082 | ExitOnFailure(hr, "Failed to append the file handle to the command line."); | 1082 | ExitOnFailure(hr, "Failed to append the file handle to the command line."); |
1083 | 1083 | ||
1084 | if (psczObfuscatedCommandLine) | 1084 | if (psczObfuscatedCommandLine) |
1085 | { | 1085 | { |
1086 | hr = StrAllocFormatted(psczObfuscatedCommandLine, L"%ls -%ls=%u", *psczObfuscatedCommandLine, BURN_COMMANDLINE_SWITCH_FILEHANDLE_SELF, hExecutableFile); | 1086 | hr = StrAllocFormatted(psczObfuscatedCommandLine, L"%ls -%ls=%Iu", *psczObfuscatedCommandLine, BURN_COMMANDLINE_SWITCH_FILEHANDLE_SELF, reinterpret_cast<size_t>(hExecutableFile)); |
1087 | ExitOnFailure(hr, "Failed to append the file handle to the obfuscated command line."); | 1087 | ExitOnFailure(hr, "Failed to append the file handle to the obfuscated command line."); |
1088 | } | 1088 | } |
1089 | 1089 | ||
@@ -1499,8 +1499,7 @@ static HRESULT ParseCommandLine( | |||
1499 | { | 1499 | { |
1500 | // Already processed in InitializeEngineState. | 1500 | // Already processed in InitializeEngineState. |
1501 | } | 1501 | } |
1502 | else if (lstrlenW(&argv[i][1]) >= lstrlenW(BURN_COMMANDLINE_SWITCH_PREFIX) && | 1502 | else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, NORM_IGNORECASE, &argv[i][1], lstrlenW(BURN_COMMANDLINE_SWITCH_PREFIX), BURN_COMMANDLINE_SWITCH_PREFIX, lstrlenW(BURN_COMMANDLINE_SWITCH_PREFIX))) |
1503 | CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, NORM_IGNORECASE, &argv[i][1], lstrlenW(BURN_COMMANDLINE_SWITCH_PREFIX), BURN_COMMANDLINE_SWITCH_PREFIX, lstrlenW(BURN_COMMANDLINE_SWITCH_PREFIX))) | ||
1504 | { | 1503 | { |
1505 | // Skip (but log) any other private burn switches we don't recognize, so that | 1504 | // Skip (but log) any other private burn switches we don't recognize, so that |
1506 | // adding future private variables doesn't break old bundles | 1505 | // adding future private variables doesn't break old bundles |