Clean up 32-bit assumptions.
Sean Hall committed
Apr 28, 2021 at 16:43 UTC
e78138558fe17d8a91929c87b2a6d0c9a482d78a
17 files changed
+139
-164
src/engine/cache.cpp
+5
-7
@@ -1119,7 +1119,7 @@ extern "C" void CacheCleanup(
1119
LPWSTR sczDelete = NULL;
1120
HANDLE hFind = INVALID_HANDLE_VALUE;
1121
WIN32_FIND_DATAW wfd = { };
1122
- DWORD cFileName = 0;
1122
+ size_t cchFileName = 0;
1123
1124
hr = CacheGetCompletedPath(fPerMachine, UNVERIFIED_CACHE_FOLDER_NAME, &sczFolder);
1125
if (SUCCEEDED(hr))
@@ -1146,17 +1146,15 @@ extern "C" void CacheCleanup(
1146
continue;
1147
}
1148
1149
- // For extra safety and to silence OACR.
1150
- wfd.cFileName[MAX_PATH - 1] = L'\0';
1151
-
1149
// Skip resume files (they end with ".R").
1153
- cFileName = lstrlenW(wfd.cFileName);
1154
- if (2 < cFileName && L'.' == wfd.cFileName[cFileName - 2] && (L'R' == wfd.cFileName[cFileName - 1] || L'r' == wfd.cFileName[cFileName - 1]))
1150
+ hr = ::StringCchLengthW(wfd.cFileName, MAX_PATH, &cchFileName);
1151
+ if (FAILED(hr) ||
1152
+ 2 < cchFileName && L'.' == wfd.cFileName[cchFileName - 2] && (L'R' == wfd.cFileName[cchFileName - 1] || L'r' == wfd.cFileName[cchFileName - 1]))
1153
{
1154
continue;
1155
}
1156
1159
- hr = PathConcat(sczFolder, wfd.cFileName, &sczDelete);
1157
+ hr = PathConcatCch(sczFolder, 0, wfd.cFileName, cchFileName, &sczDelete);
1158
if (SUCCEEDED(hr))
1159
{
1160
hr = FileEnsureDelete(sczDelete);
src/engine/condition.cpp
+21
-3
@@ -513,6 +513,7 @@ static HRESULT NextSymbol(
513
{
514
HRESULT hr = S_OK;
515
WORD charType = 0;
516
+ ptrdiff_t cchPosition = 0;
517
DWORD iPosition = 0;
518
DWORD n = 0;
519
@@ -530,7 +531,13 @@ static HRESULT NextSymbol(
531
}
532
++pContext->wzRead;
533
}
533
- iPosition = (DWORD)(pContext->wzRead - pContext->wzCondition);
534
+
535
+ cchPosition = pContext->wzRead - pContext->wzCondition;
536
+ if (DWORD_MAX < cchPosition || 0 > cchPosition)
537
+ {
538
+ ExitOnFailure(hr = E_INVALIDARG, "Symbol was too long: %ls", pContext->wzCondition);
539
+ }
540
+ iPosition = (DWORD)cchPosition;
541
542
// read depending on first character type
543
switch (pContext->wzRead[0])
@@ -922,8 +929,19 @@ static HRESULT CompareStringValues(
929
{
930
HRESULT hr = S_OK;
931
DWORD dwCompareString = (comparison & INSENSITIVE) ? NORM_IGNORECASE : 0;
925
- int cchLeft = lstrlenW(wzLeftOperand);
926
- int cchRight = lstrlenW(wzRightOperand);
932
+ size_t cchLeftSize = 0;
933
+ size_t cchRightSize = 0;
934
+ int cchLeft = 0;
935
+ int cchRight = 0;
936
+
937
+ hr = ::StringCchLengthW(wzLeftOperand, STRSAFE_MAX_CCH, &cchLeftSize);
938
+ ExitOnRootFailure(hr, "Failed to get length of left string: %ls", wzLeftOperand);
939
+
940
+ hr = ::StringCchLengthW(wzRightOperand, STRSAFE_MAX_CCH, &cchRightSize);
941
+ ExitOnRootFailure(hr, "Failed to get length of right string: %ls", wzRightOperand);
942
+
943
+ cchLeft = static_cast<int>(cchLeftSize);
944
+ cchRight = static_cast<int>(cchRightSize);
945
946
switch (comparison)
947
{
src/engine/core.cpp
+4
-5
@@ -1050,7 +1050,7 @@ extern "C" HRESULT CoreAppendFileHandleAttachedToCommandLine(
1050
ExitWithLastError(hr, "Failed to duplicate file handle for attached container.");
1051
}
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.");
1055
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);
1079
if (INVALID_HANDLE_VALUE != hExecutableFile)
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.");
1083
1084
if (psczObfuscatedCommandLine)
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.");
1088
}
1089
@@ -1499,8 +1499,7 @@ static HRESULT ParseCommandLine(
1499
{
1500
// Already processed in InitializeEngineState.
1501
}
1502
- else if (lstrlenW(&argv[i][1]) >= 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)))
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
{
1504
// Skip (but log) any other private burn switches we don't recognize, so that
1505
// adding future private variables doesn't break old bundles
src/engine/elevation.cpp
+47
-43
@@ -157,7 +157,7 @@ static HRESULT OnApplyInitialize(
157
__in HANDLE* phLock,
158
__in BOOL* pfDisabledWindowsUpdate,
159
__in BYTE* pbData,
160
- __in DWORD cbData
160
+ __in SIZE_T cbData
161
);
162
static HRESULT OnApplyUninitialize(
163
__in HANDLE* phLock
@@ -166,39 +166,39 @@ static HRESULT OnSessionBegin(
166
__in BURN_REGISTRATION* pRegistration,
167
__in BURN_VARIABLES* pVariables,
168
__in BYTE* pbData,
169
- __in DWORD cbData
169
+ __in SIZE_T cbData
170
);
171
static HRESULT OnSessionResume(
172
__in BURN_REGISTRATION* pRegistration,
173
__in BURN_VARIABLES* pVariables,
174
__in BYTE* pbData,
175
- __in DWORD cbData
175
+ __in SIZE_T cbData
176
);
177
static HRESULT OnSessionEnd(
178
__in BURN_PACKAGES* pPackages,
179
__in BURN_REGISTRATION* pRegistration,
180
__in BURN_VARIABLES* pVariables,
181
__in BYTE* pbData,
182
- __in DWORD cbData
182
+ __in SIZE_T cbData
183
);
184
static HRESULT OnSaveState(
185
__in BURN_REGISTRATION* pRegistration,
186
__in BYTE* pbData,
187
- __in DWORD cbData
187
+ __in SIZE_T cbData
188
);
189
static HRESULT OnCacheCompletePayload(
190
__in HANDLE hPipe,
191
__in BURN_PACKAGES* pPackages,
192
__in BURN_PAYLOADS* pPayloads,
193
__in BYTE* pbData,
194
- __in DWORD cbData
194
+ __in SIZE_T cbData
195
);
196
static HRESULT OnCacheVerifyPayload(
197
__in HANDLE hPipe,
198
__in BURN_PACKAGES* pPackages,
199
__in BURN_PAYLOADS* pPayloads,
200
__in BYTE* pbData,
201
- __in DWORD cbData
201
+ __in SIZE_T cbData
202
);
203
static void OnCacheCleanup(
204
__in_z LPCWSTR wzBundleId
@@ -206,7 +206,7 @@ static void OnCacheCleanup(
206
static HRESULT OnProcessDependentRegistration(
207
__in const BURN_REGISTRATION* pRegistration,
208
__in BYTE* pbData,
209
- __in DWORD cbData
209
+ __in SIZE_T cbData
210
);
211
static HRESULT OnExecuteExePackage(
212
__in HANDLE hPipe,
@@ -214,40 +214,40 @@ static HRESULT OnExecuteExePackage(
214
__in BURN_RELATED_BUNDLES* pRelatedBundles,
215
__in BURN_VARIABLES* pVariables,
216
__in BYTE* pbData,
217
- __in DWORD cbData
217
+ __in SIZE_T cbData
218
);
219
static HRESULT OnExecuteMsiPackage(
220
__in HANDLE hPipe,
221
__in BURN_PACKAGES* pPackages,
222
__in BURN_VARIABLES* pVariables,
223
__in BYTE* pbData,
224
- __in DWORD cbData
224
+ __in SIZE_T cbData
225
);
226
static HRESULT OnExecuteMspPackage(
227
__in HANDLE hPipe,
228
__in BURN_PACKAGES* pPackages,
229
__in BURN_VARIABLES* pVariables,
230
__in BYTE* pbData,
231
- __in DWORD cbData
231
+ __in SIZE_T cbData
232
);
233
static HRESULT OnExecuteMsuPackage(
234
__in HANDLE hPipe,
235
__in BURN_PACKAGES* pPackages,
236
__in BURN_VARIABLES* pVariables,
237
__in BYTE* pbData,
238
- __in DWORD cbData
238
+ __in SIZE_T cbData
239
);
240
static HRESULT OnExecutePackageProviderAction(
241
__in BURN_PACKAGES* pPackages,
242
__in BURN_RELATED_BUNDLES* pRelatedBundles,
243
__in BYTE* pbData,
244
- __in DWORD cbData
244
+ __in SIZE_T cbData
245
);
246
static HRESULT OnExecutePackageDependencyAction(
247
__in BURN_PACKAGES* pPackages,
248
__in BURN_RELATED_BUNDLES* pRelatedBundles,
249
__in BYTE* pbData,
250
- __in DWORD cbData
250
+ __in SIZE_T cbData
251
);
252
static HRESULT CALLBACK BurnCacheMessageHandler(
253
__in BURN_CACHE_MESSAGE* pMessage,
@@ -275,29 +275,29 @@ static int MsiExecuteMessageHandler(
275
static HRESULT OnCleanPackage(
276
__in BURN_PACKAGES* pPackages,
277
__in BYTE* pbData,
278
- __in DWORD cbData
278
+ __in SIZE_T cbData
279
);
280
static HRESULT OnLaunchApprovedExe(
281
__in HANDLE hPipe,
282
__in BURN_APPROVED_EXES* pApprovedExes,
283
__in BURN_VARIABLES* pVariables,
284
__in BYTE* pbData,
285
- __in DWORD cbData
285
+ __in SIZE_T cbData
286
);
287
static HRESULT OnMsiBeginTransaction(
288
__in BURN_PACKAGES* pPackages,
289
__in BYTE* pbData,
290
- __in DWORD cbData
290
+ __in SIZE_T cbData
291
);
292
static HRESULT OnMsiCommitTransaction(
293
__in BURN_PACKAGES* pPackages,
294
__in BYTE* pbData,
295
- __in DWORD cbData
295
+ __in SIZE_T cbData
296
);
297
static HRESULT OnMsiRollbackTransaction(
298
__in BURN_PACKAGES* pPackages,
299
__in BYTE* pbData,
300
- __in DWORD cbData
300
+ __in SIZE_T cbData
301
);
302
static HRESULT ElevatedOnPauseAUBegin(
303
__in HANDLE hPipe
@@ -603,7 +603,7 @@ HRESULT ElevationSaveState(
603
DWORD dwResult = 0;
604
605
// send message
606
- hr = PipeSendMessage(hPipe, BURN_ELEVATION_MESSAGE_TYPE_SAVE_STATE, pbBuffer, (DWORD)cbBuffer, NULL, NULL, &dwResult);
606
+ hr = PipeSendMessage(hPipe, BURN_ELEVATION_MESSAGE_TYPE_SAVE_STATE, pbBuffer, cbBuffer, NULL, NULL, &dwResult);
607
ExitOnFailure(hr, "Failed to send message to per-machine process.");
608
609
hr = (HRESULT)dwResult;
@@ -858,6 +858,8 @@ extern "C" HRESULT ElevationMsiCommitTransaction(
858
hr = static_cast<HRESULT>(dwResult);
859
860
LExit:
861
+ ReleaseBuffer(pbData);
862
+
863
return hr;
864
}
865
@@ -884,6 +886,8 @@ extern "C" HRESULT ElevationMsiRollbackTransaction(
886
hr = static_cast<HRESULT>(dwResult);
887
888
LExit:
889
+ ReleaseBuffer(pbData);
890
+
891
return hr;
892
}
893
@@ -1612,7 +1616,7 @@ static HRESULT ProcessMsiPackageMessages(
1616
message.rgwzData = (LPCWSTR*)rgwzMsiData;
1617
}
1618
1615
- hr = BuffReadNumber((BYTE*)pMsg->pvData, pMsg->cbData, &iData, (DWORD*)&message.dwAllowedResults);
1619
+ hr = BuffReadNumber((BYTE*)pMsg->pvData, pMsg->cbData, &iData, &message.dwAllowedResults);
1620
ExitOnFailure(hr, "Failed to read UI flags.");
1621
1622
// Process the rest of the message.
@@ -1907,7 +1911,7 @@ static HRESULT OnApplyInitialize(
1911
__in HANDLE* phLock,
1912
__in BOOL* pfDisabledWindowsUpdate,
1913
__in BYTE* pbData,
1910
- __in DWORD cbData
1914
+ __in SIZE_T cbData
1915
)
1916
{
1917
HRESULT hr = S_OK;
@@ -2031,7 +2035,7 @@ static HRESULT OnSessionBegin(
2035
__in BURN_REGISTRATION* pRegistration,
2036
__in BURN_VARIABLES* pVariables,
2037
__in BYTE* pbData,
2034
- __in DWORD cbData
2038
+ __in SIZE_T cbData
2039
)
2040
{
2041
HRESULT hr = S_OK;
@@ -2077,7 +2081,7 @@ static HRESULT OnSessionResume(
2081
__in BURN_REGISTRATION* pRegistration,
2082
__in BURN_VARIABLES* pVariables,
2083
__in BYTE* pbData,
2080
- __in DWORD cbData
2084
+ __in SIZE_T cbData
2085
)
2086
{
2087
HRESULT hr = S_OK;
@@ -2106,7 +2110,7 @@ static HRESULT OnSessionEnd(
2110
__in BURN_REGISTRATION* pRegistration,
2111
__in BURN_VARIABLES* pVariables,
2112
__in BYTE* pbData,
2109
- __in DWORD cbData
2113
+ __in SIZE_T cbData
2114
)
2115
{
2116
HRESULT hr = S_OK;
@@ -2136,7 +2140,7 @@ LExit:
2140
static HRESULT OnSaveState(
2141
__in BURN_REGISTRATION* pRegistration,
2142
__in BYTE* pbData,
2139
- __in DWORD cbData
2143
+ __in SIZE_T cbData
2144
)
2145
{
2146
HRESULT hr = S_OK;
@@ -2154,7 +2158,7 @@ static HRESULT OnCacheCompletePayload(
2158
__in BURN_PACKAGES* pPackages,
2159
__in BURN_PAYLOADS* pPayloads,
2160
__in BYTE* pbData,
2157
- __in DWORD cbData
2161
+ __in SIZE_T cbData
2162
)
2163
{
2164
HRESULT hr = S_OK;
@@ -2213,7 +2217,7 @@ static HRESULT OnCacheVerifyPayload(
2217
__in BURN_PACKAGES* pPackages,
2218
__in BURN_PAYLOADS* pPayloads,
2219
__in BYTE* pbData,
2216
- __in DWORD cbData
2220
+ __in SIZE_T cbData
2221
)
2222
{
2223
HRESULT hr = S_OK;
@@ -2273,7 +2277,7 @@ static void OnCacheCleanup(
2277
static HRESULT OnProcessDependentRegistration(
2278
__in const BURN_REGISTRATION* pRegistration,
2279
__in BYTE* pbData,
2276
- __in DWORD cbData
2280
+ __in SIZE_T cbData
2281
)
2282
{
2283
HRESULT hr = S_OK;
@@ -2309,7 +2313,7 @@ static HRESULT OnExecuteExePackage(
2313
__in BURN_RELATED_BUNDLES* pRelatedBundles,
2314
__in BURN_VARIABLES* pVariables,
2315
__in BYTE* pbData,
2312
- __in DWORD cbData
2316
+ __in SIZE_T cbData
2317
)
2318
{
2319
HRESULT hr = S_OK;
@@ -2393,7 +2397,7 @@ static HRESULT OnExecuteMsiPackage(
2397
__in BURN_PACKAGES* pPackages,
2398
__in BURN_VARIABLES* pVariables,
2399
__in BYTE* pbData,
2396
- __in DWORD cbData
2400
+ __in SIZE_T cbData
2401
)
2402
{
2403
HRESULT hr = S_OK;
@@ -2490,7 +2494,7 @@ static HRESULT OnExecuteMspPackage(
2494
__in BURN_PACKAGES* pPackages,
2495
__in BURN_VARIABLES* pVariables,
2496
__in BYTE* pbData,
2493
- __in DWORD cbData
2497
+ __in SIZE_T cbData
2498
)
2499
{
2500
HRESULT hr = S_OK;
@@ -2585,7 +2589,7 @@ static HRESULT OnExecuteMsuPackage(
2589
__in BURN_PACKAGES* pPackages,
2590
__in BURN_VARIABLES* pVariables,
2591
__in BYTE* pbData,
2588
- __in DWORD cbData
2592
+ __in SIZE_T cbData
2593
)
2594
{
2595
HRESULT hr = S_OK;
@@ -2644,7 +2648,7 @@ static HRESULT OnExecutePackageProviderAction(
2648
__in BURN_PACKAGES* pPackages,
2649
__in BURN_RELATED_BUNDLES* pRelatedBundles,
2650
__in BYTE* pbData,
2647
- __in DWORD cbData
2651
+ __in SIZE_T cbData
2652
)
2653
{
2654
HRESULT hr = S_OK;
@@ -2684,7 +2688,7 @@ static HRESULT OnExecutePackageDependencyAction(
2688
__in BURN_PACKAGES* pPackages,
2689
__in BURN_RELATED_BUNDLES* pRelatedBundles,
2690
__in BYTE* pbData,
2687
- __in DWORD cbData
2691
+ __in SIZE_T cbData
2692
)
2693
{
2694
HRESULT hr = S_OK;
@@ -2953,7 +2957,7 @@ LExit:
2957
static HRESULT OnCleanPackage(
2958
__in BURN_PACKAGES* pPackages,
2959
__in BYTE* pbData,
2956
- __in DWORD cbData
2960
+ __in SIZE_T cbData
2961
)
2962
{
2963
HRESULT hr = S_OK;
@@ -2982,7 +2986,7 @@ static HRESULT OnLaunchApprovedExe(
2986
__in BURN_APPROVED_EXES* pApprovedExes,
2987
__in BURN_VARIABLES* pVariables,
2988
__in BYTE* pbData,
2985
- __in DWORD cbData
2989
+ __in SIZE_T cbData
2990
)
2991
{
2992
HRESULT hr = S_OK;
@@ -3051,7 +3055,7 @@ LExit:
3055
static HRESULT OnMsiBeginTransaction(
3056
__in BURN_PACKAGES* pPackages,
3057
__in BYTE* pbData,
3054
- __in DWORD cbData
3058
+ __in SIZE_T cbData
3059
)
3060
{
3061
HRESULT hr = S_OK;
@@ -3067,7 +3071,7 @@ static HRESULT OnMsiBeginTransaction(
3071
hr = BuffReadString(pbData, cbData, &iData, &sczLogPath);
3072
ExitOnFailure(hr, "Failed to read transaction log path.");
3073
3070
- PackageFindRollbackBoundaryById(pPackages, sczId, &pRollbackBoundary);
3074
+ hr = PackageFindRollbackBoundaryById(pPackages, sczId, &pRollbackBoundary);
3075
ExitOnFailure(hr, "Failed to find rollback boundary: %ls", sczId);
3076
3077
pRollbackBoundary->sczLogPath = sczLogPath;
@@ -3089,7 +3093,7 @@ LExit:
3093
static HRESULT OnMsiCommitTransaction(
3094
__in BURN_PACKAGES* pPackages,
3095
__in BYTE* pbData,
3092
- __in DWORD cbData
3096
+ __in SIZE_T cbData
3097
)
3098
{
3099
HRESULT hr = S_OK;
@@ -3105,7 +3109,7 @@ static HRESULT OnMsiCommitTransaction(
3109
hr = BuffReadString(pbData, cbData, &iData, &sczLogPath);
3110
ExitOnFailure(hr, "Failed to read transaction log path.");
3111
3108
- PackageFindRollbackBoundaryById(pPackages, sczId, &pRollbackBoundary);
3112
+ hr = PackageFindRollbackBoundaryById(pPackages, sczId, &pRollbackBoundary);
3113
ExitOnFailure(hr, "Failed to find rollback boundary: %ls", sczId);
3114
3115
pRollbackBoundary->sczLogPath = sczLogPath;
@@ -3127,7 +3131,7 @@ LExit:
3131
static HRESULT OnMsiRollbackTransaction(
3132
__in BURN_PACKAGES* pPackages,
3133
__in BYTE* pbData,
3130
- __in DWORD cbData
3134
+ __in SIZE_T cbData
3135
)
3136
{
3137
HRESULT hr = S_OK;
@@ -3143,7 +3147,7 @@ static HRESULT OnMsiRollbackTransaction(
3147
hr = BuffReadString(pbData, cbData, &iData, &sczLogPath);
3148
ExitOnFailure(hr, "Failed to read transaction log path.");
3149
3146
- PackageFindRollbackBoundaryById(pPackages, sczId, &pRollbackBoundary);
3150
+ hr = PackageFindRollbackBoundaryById(pPackages, sczId, &pRollbackBoundary);
3151
ExitOnFailure(hr, "Failed to find rollback boundary: %ls", sczId);
3152
3153
pRollbackBoundary->sczLogPath = sczLogPath;
src/engine/embedded.cpp
+4
-4
@@ -22,14 +22,14 @@ static HRESULT OnEmbeddedErrorMessage(
22
__in PFN_GENERICMESSAGEHANDLER pfnMessageHandler,
23
__in LPVOID pvContext,
24
__in_bcount(cbData) BYTE* pbData,
25
- __in DWORD cbData,
25
+ __in SIZE_T cbData,
26
__out DWORD* pdwResult
27
);
28
static HRESULT OnEmbeddedProgress(
29
__in PFN_GENERICMESSAGEHANDLER pfnMessageHandler,
30
__in LPVOID pvContext,
31
__in_bcount(cbData) BYTE* pbData,
32
- __in DWORD cbData,
32
+ __in SIZE_T cbData,
33
__out DWORD* pdwResult
34
);
35
@@ -142,7 +142,7 @@ static HRESULT OnEmbeddedErrorMessage(
142
__in PFN_GENERICMESSAGEHANDLER pfnMessageHandler,
143
__in LPVOID pvContext,
144
__in_bcount(cbData) BYTE* pbData,
145
- __in DWORD cbData,
145
+ __in SIZE_T cbData,
146
__out DWORD* pdwResult
147
)
148
{
@@ -176,7 +176,7 @@ static HRESULT OnEmbeddedProgress(
176
__in PFN_GENERICMESSAGEHANDLER pfnMessageHandler,
177
__in LPVOID pvContext,
178
__in_bcount(cbData) BYTE* pbData,
179
- __in DWORD cbData,
179
+ __in SIZE_T cbData,
180
__out DWORD* pdwResult
181
)
182
{
src/engine/engine.cpp
+7
-2
@@ -324,6 +324,7 @@ static HRESULT InitializeEngineState(
324
LPCWSTR wzParam = NULL;
325
HANDLE hSectionFile = hEngineFile;
326
HANDLE hSourceEngineFile = INVALID_HANDLE_VALUE;
327
+ DWORD64 qw = 0;
328
329
pEngineState->automaticUpdates = BURN_AU_PAUSE_ACTION_IFELEVATED;
330
pEngineState->dwElevatedLoggingTlsId = TLS_OUT_OF_INDEXES;
@@ -343,8 +344,10 @@ static HRESULT InitializeEngineState(
344
ExitOnRootFailure(hr = E_INVALIDARG, "Missing required parameter for switch: %ls", BURN_COMMANDLINE_SWITCH_FILEHANDLE_ATTACHED);
345
}
346
346
- hr = StrStringToUInt32(wzParam, 0, reinterpret_cast<UINT*>(&hSourceEngineFile));
347
+ hr = StrStringToUInt64(wzParam, 0, &qw);
348
ExitOnFailure(hr, "Failed to parse file handle: '%ls'", (wzParam));
349
+
350
+ hSourceEngineFile = (HANDLE)qw;
351
}
352
if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, NORM_IGNORECASE, &pEngineState->argv[i][1], lstrlenW(BURN_COMMANDLINE_SWITCH_FILEHANDLE_SELF), BURN_COMMANDLINE_SWITCH_FILEHANDLE_SELF, lstrlenW(BURN_COMMANDLINE_SWITCH_FILEHANDLE_SELF)))
353
{
@@ -354,8 +357,10 @@ static HRESULT InitializeEngineState(
357
ExitOnRootFailure(hr = E_INVALIDARG, "Missing required parameter for switch: %ls", BURN_COMMANDLINE_SWITCH_FILEHANDLE_SELF);
358
}
359
357
- hr = StrStringToUInt32(wzParam, 0, reinterpret_cast<UINT*>(&hSectionFile));
360
+ hr = StrStringToUInt64(wzParam, 0, &qw);
361
ExitOnFailure(hr, "Failed to parse file handle: '%ls'", (wzParam));
362
+
363
+ hSectionFile = (HANDLE)qw;
364
}
365
}
366
}
src/engine/engine.vcxproj
+2
-2
@@ -1,7 +1,7 @@
1
<?xml version="1.0" encoding="utf-8"?>
2
<!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. -->
3
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
4
- <Import Project="..\..\packages\WixToolset.DUtil.4.0.70\build\WixToolset.DUtil.props" Condition="Exists('..\..\packages\WixToolset.DUtil.4.0.70\build\WixToolset.DUtil.props')" />
4
+ <Import Project="..\..\packages\WixToolset.DUtil.4.0.72\build\WixToolset.DUtil.props" Condition="Exists('..\..\packages\WixToolset.DUtil.4.0.72\build\WixToolset.DUtil.props')" />
5
<ItemGroup Label="ProjectConfigurations">
6
<ProjectConfiguration Include="Debug|Win32">
7
<Configuration>Debug</Configuration>
@@ -166,6 +166,6 @@ rc.exe -fo "$(OutDir)engine.res" "$(IntDir)engine.messages.rc"</Command>
166
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
167
</PropertyGroup>
168
<Error Condition="!Exists('..\..\packages\Nerdbank.GitVersioning.3.3.37\build\Nerdbank.GitVersioning.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\Nerdbank.GitVersioning.3.3.37\build\Nerdbank.GitVersioning.targets'))" />
169
- <Error Condition="!Exists('..\..\packages\WixToolset.DUtil.4.0.70\build\WixToolset.DUtil.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\WixToolset.DUtil.4.0.70\build\WixToolset.DUtil.props'))" />
169
+ <Error Condition="!Exists('..\..\packages\WixToolset.DUtil.4.0.72\build\WixToolset.DUtil.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\WixToolset.DUtil.4.0.72\build\WixToolset.DUtil.props'))" />
170
</Target>
171
</Project>
\ No newline at end of file
src/engine/exeengine.cpp
+1
-1
@@ -448,7 +448,7 @@ extern "C" HRESULT ExeEngineExecutePackage(
448
}
449
450
// build command
451
- if (0 < lstrlenW(sczArguments))
451
+ if (*sczArguments)
452
{
453
hr = VariableFormatString(pVariables, sczArguments, &sczArgumentsFormatted, NULL);
454
ExitOnFailure(hr, "Failed to format argument string.");
src/engine/logging.cpp
+3
-3
@@ -717,10 +717,10 @@ static HRESULT GetNonSessionSpecificTempFolder(
717
{
718
HRESULT hr = S_OK;
719
WCHAR wzTempFolder[MAX_PATH] = { };
720
- DWORD cchTempFolder = 0;
720
+ SIZE_T cchTempFolder = 0;
721
DWORD dwSessionId = 0;
722
LPWSTR sczSessionId = 0;
723
- DWORD cchSessionId = 0;
723
+ SIZE_T cchSessionId = 0;
724
725
if (!::GetTempPathW(countof(wzTempFolder), wzTempFolder))
726
{
@@ -740,7 +740,7 @@ static HRESULT GetNonSessionSpecificTempFolder(
740
hr = ::StringCchLengthW(sczSessionId, STRSAFE_MAX_CCH, reinterpret_cast<size_t*>(&cchSessionId));
741
ExitOnFailure(hr, "Failed to get length of session id string.");
742
743
- if (CSTR_EQUAL == ::CompareStringW(LOCALE_NEUTRAL, 0, wzTempFolder + cchTempFolder - cchSessionId, cchSessionId, sczSessionId, cchSessionId))
743
+ if (CSTR_EQUAL == ::CompareStringW(LOCALE_NEUTRAL, 0, wzTempFolder + cchTempFolder - cchSessionId, static_cast<DWORD>(cchSessionId), sczSessionId, static_cast<DWORD>(cchSessionId)))
744
{
745
cchTempFolder -= cchSessionId;
746
}
src/engine/packages.config
+1
-1
@@ -1,5 +1,5 @@
1
<?xml version="1.0" encoding="utf-8"?>
2
<packages>
3
<package id="Nerdbank.GitVersioning" version="3.3.37" targetFramework="native" developmentDependency="true" />
4
- <package id="WixToolset.DUtil" version="4.0.70" targetFramework="native" />
4
+ <package id="WixToolset.DUtil" version="4.0.72" targetFramework="native" />
5
</packages>
\ No newline at end of file
src/engine/pipe.cpp
+28
-77
@@ -429,7 +429,6 @@ extern "C" HRESULT PipeWaitForChildConnect(
429
DWORD cbSecret = lstrlenW(wzSecret) * sizeof(WCHAR);
430
DWORD dwCurrentProcessId = ::GetCurrentProcessId();
431
DWORD dwAck = 0;
432
- DWORD cb = 0;
432
433
for (DWORD i = 0; i < countof(hPipes) && INVALID_HANDLE_VALUE != hPipes[i]; ++i)
434
{
@@ -487,26 +486,18 @@ extern "C" HRESULT PipeWaitForChildConnect(
486
}
487
488
// Prove we are the one that created the elevated process by passing the secret.
490
- if (!::WriteFile(hPipe, &cbSecret, sizeof(cbSecret), &cb, NULL))
491
- {
492
- ExitWithLastError(hr, "Failed to write secret length to pipe.");
493
- }
489
+ hr = FileWriteHandle(hPipe, reinterpret_cast<LPCBYTE>(&cbSecret), sizeof(cbSecret));
490
+ ExitOnFailure(hr, "Failed to write secret length to pipe.");
491
495
- if (!::WriteFile(hPipe, wzSecret, cbSecret, &cb, NULL))
496
- {
497
- ExitWithLastError(hr, "Failed to write secret to pipe.");
498
- }
492
+ hr = FileWriteHandle(hPipe, reinterpret_cast<LPCBYTE>(wzSecret), cbSecret);
493
+ ExitOnFailure(hr, "Failed to write secret to pipe.");
494
500
- if (!::WriteFile(hPipe, &dwCurrentProcessId, sizeof(dwCurrentProcessId), &cb, NULL))
501
- {
502
- ExitWithLastError(hr, "Failed to write our process id to pipe.");
503
- }
495
+ hr = FileWriteHandle(hPipe, reinterpret_cast<LPCBYTE>(&dwCurrentProcessId), sizeof(dwCurrentProcessId));
496
+ ExitOnFailure(hr, "Failed to write our process id to pipe.");
497
498
// Wait until the elevated process responds that it is ready to go.
506
- if (!::ReadFile(hPipe, &dwAck, sizeof(dwAck), &cb, NULL))
507
- {
508
- ExitWithLastError(hr, "Failed to read ACK from pipe.");
509
- }
499
+ hr = FileReadHandle(hPipe, reinterpret_cast<LPBYTE>(&dwAck), sizeof(dwAck));
500
+ ExitOnFailure(hr, "Failed to read ACK from pipe.");
501
502
// The ACK should match out expected child process id.
503
//if (pConnection->dwProcessId != dwAck)
@@ -724,17 +715,8 @@ static HRESULT WritePipeMessage(
715
ExitOnFailure(hr, "Failed to allocate message to write.");
716
717
// Write the message.
727
- DWORD cbWrote = 0;
728
- SIZE_T cbTotalWritten = 0;
729
- while (cbTotalWritten < cb)
730
- {
731
- if (!::WriteFile(hPipe, pv, (DWORD)(cb - cbTotalWritten), &cbWrote, NULL))
732
- {
733
- ExitWithLastError(hr, "Failed to write message type to pipe.");
734
- }
735
-
736
- cbTotalWritten += cbWrote;
737
- }
718
+ hr = FileWriteHandle(hPipe, reinterpret_cast<LPCBYTE>(pv), cb);
719
+ ExitOnFailure(hr, "Failed to write message type to pipe.");
720
721
LExit:
722
ReleaseMem(pv);
@@ -747,46 +729,25 @@ static HRESULT GetPipeMessage(
729
)
730
{
731
HRESULT hr = S_OK;
750
- DWORD rgdwMessageAndByteCount[2] = { };
751
- DWORD cb = 0;
752
- DWORD cbRead = 0;
732
+ BYTE pbMessageAndByteCount[sizeof(DWORD) + sizeof(SIZE_T)] = { };
733
754
- while (cbRead < sizeof(rgdwMessageAndByteCount))
734
+ hr = FileReadHandle(hPipe, pbMessageAndByteCount, sizeof(pbMessageAndByteCount));
735
+ if (HRESULT_FROM_WIN32(ERROR_BROKEN_PIPE) == hr)
736
{
756
- if (!::ReadFile(hPipe, reinterpret_cast<BYTE*>(rgdwMessageAndByteCount) + cbRead, sizeof(rgdwMessageAndByteCount) - cbRead, &cb, NULL))
757
- {
758
- DWORD er = ::GetLastError();
759
- if (ERROR_MORE_DATA == er)
760
- {
761
- hr = S_OK;
762
- }
763
- else if (ERROR_BROKEN_PIPE == er) // parent process shut down, time to exit.
764
- {
765
- memset(rgdwMessageAndByteCount, 0, sizeof(rgdwMessageAndByteCount));
766
- hr = S_FALSE;
767
- break;
768
- }
769
- else
770
- {
771
- hr = HRESULT_FROM_WIN32(er);
772
- }
773
- ExitOnRootFailure(hr, "Failed to read message from pipe.");
774
- }
775
-
776
- cbRead += cb;
737
+ memset(pbMessageAndByteCount, 0, sizeof(pbMessageAndByteCount));
738
+ hr = S_FALSE;
739
}
740
+ ExitOnFailure(hr, "Failed to read message from pipe.");
741
779
- pMsg->dwMessage = rgdwMessageAndByteCount[0];
780
- pMsg->cbData = rgdwMessageAndByteCount[1];
742
+ pMsg->dwMessage = *(DWORD*)(pbMessageAndByteCount);
743
+ pMsg->cbData = *(SIZE_T*)(pbMessageAndByteCount + sizeof(DWORD));
744
if (pMsg->cbData)
745
{
746
pMsg->pvData = MemAlloc(pMsg->cbData, FALSE);
747
ExitOnNull(pMsg->pvData, hr, E_OUTOFMEMORY, "Failed to allocate data for message.");
748
786
- if (!::ReadFile(hPipe, pMsg->pvData, pMsg->cbData, &cb, NULL))
787
- {
788
- ExitWithLastError(hr, "Failed to read data for message.");
789
- }
749
+ hr = FileReadHandle(hPipe, reinterpret_cast<LPBYTE>(pMsg->pvData), pMsg->cbData);
750
+ ExitOnFailure(hr, "Failed to read data for message.");
751
752
pMsg->fAllocatedData = TRUE;
753
}
@@ -810,15 +771,11 @@ static HRESULT ChildPipeConnected(
771
LPWSTR sczVerificationSecret = NULL;
772
DWORD cbVerificationSecret = 0;
773
DWORD dwVerificationProcessId = 0;
813
- DWORD dwRead = 0;
774
DWORD dwAck = ::GetCurrentProcessId(); // send our process id as the ACK.
815
- DWORD cb = 0;
775
776
// Read the verification secret.
818
- if (!::ReadFile(hPipe, &cbVerificationSecret, sizeof(cbVerificationSecret), &dwRead, NULL))
819
- {
820
- ExitWithLastError(hr, "Failed to read size of verification secret from parent pipe.");
821
- }
777
+ hr = FileReadHandle(hPipe, reinterpret_cast<LPBYTE>(&cbVerificationSecret), sizeof(cbVerificationSecret));
778
+ ExitOnFailure(hr, "Failed to read size of verification secret from parent pipe.");
779
780
if (255 < cbVerificationSecret / sizeof(WCHAR))
781
{
@@ -829,10 +786,8 @@ static HRESULT ChildPipeConnected(
786
hr = StrAlloc(&sczVerificationSecret, cbVerificationSecret / sizeof(WCHAR) + 1);
787
ExitOnFailure(hr, "Failed to allocate buffer for verification secret.");
788
832
- if (!::ReadFile(hPipe, sczVerificationSecret, cbVerificationSecret, &dwRead, NULL))
833
- {
834
- ExitWithLastError(hr, "Failed to read verification secret from parent pipe.");
835
- }
789
+ FileReadHandle(hPipe, reinterpret_cast<LPBYTE>(sczVerificationSecret), cbVerificationSecret);
790
+ ExitOnFailure(hr, "Failed to read verification secret from parent pipe.");
791
792
// Verify the secrets match.
793
if (CSTR_EQUAL != ::CompareStringW(LOCALE_NEUTRAL, 0, sczVerificationSecret, -1, wzSecret, -1))
@@ -842,10 +797,8 @@ static HRESULT ChildPipeConnected(
797
}
798
799
// Read the verification process id.
845
- if (!::ReadFile(hPipe, &dwVerificationProcessId, sizeof(dwVerificationProcessId), &dwRead, NULL))
846
- {
847
- ExitWithLastError(hr, "Failed to read verification process id from parent pipe.");
848
- }
800
+ hr = FileReadHandle(hPipe, reinterpret_cast<LPBYTE>(&dwVerificationProcessId), sizeof(dwVerificationProcessId));
801
+ ExitOnFailure(hr, "Failed to read verification process id from parent pipe.");
802
803
// If a process id was not provided, we'll trust the process id from the parent.
804
if (*pdwProcessId == 0)
@@ -859,10 +812,8 @@ static HRESULT ChildPipeConnected(
812
}
813
814
// All is well, tell the parent process.
862
- if (!::WriteFile(hPipe, &dwAck, sizeof(dwAck), &cb, NULL))
863
- {
864
- ExitWithLastError(hr, "Failed to inform parent process that child is running.");
865
- }
815
+ hr = FileWriteHandle(hPipe, reinterpret_cast<LPCBYTE>(&dwAck), sizeof(dwAck));
816
+ ExitOnFailure(hr, "Failed to inform parent process that child is running.");
817
818
LExit:
819
ReleaseStr(sczVerificationSecret);
src/engine/pipe.h
+1
-1
@@ -27,7 +27,7 @@ typedef enum _BURN_PIPE_MESSAGE_TYPE : DWORD
27
typedef struct _BURN_PIPE_MESSAGE
28
{
29
DWORD dwMessage;
30
- DWORD cbData;
30
+ SIZE_T cbData;
31
32
BOOL fAllocatedData;
33
LPVOID pvData;
src/engine/variable.cpp
+1
-1
@@ -1106,7 +1106,7 @@ static HRESULT FormatString(
1106
::EnterCriticalSection(&pVariables->csAccess);
1107
1108
// allocate buffer for format string
1109
- hr = ::StringCchLengthW(wzIn, STRSAFE_MAX_CCH - 1, &cchIn);
1109
+ hr = ::StringCchLengthW(wzIn, STRSAFE_MAX_LENGTH, &cchIn);
1110
ExitOnFailure(hr, "Failed to length of format string.");
1111
1112
hr = StrAlloc(&sczFormat, cchIn + 1);
src/stub/packages.config
+1
-1
@@ -4,5 +4,5 @@
4
<package id="Microsoft.SourceLink.Common" version="1.0.0" targetFramework="native" developmentDependency="true" />
5
<package id="Microsoft.SourceLink.GitHub" version="1.0.0" targetFramework="native" developmentDependency="true" />
6
<package id="Nerdbank.GitVersioning" version="3.3.37" targetFramework="native" developmentDependency="true" />
7
- <package id="WixToolset.DUtil" version="4.0.70" targetFramework="native" />
7
+ <package id="WixToolset.DUtil" version="4.0.72" targetFramework="native" />
8
</packages>
\ No newline at end of file
src/stub/stub.vcxproj
+2
-2
@@ -2,7 +2,7 @@
2
<!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. -->
3
4
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
5
- <Import Project="..\..\packages\WixToolset.DUtil.4.0.70\build\WixToolset.DUtil.props" Condition="Exists('..\..\packages\WixToolset.DUtil.4.0.70\build\WixToolset.DUtil.props')" />
5
+ <Import Project="..\..\packages\WixToolset.DUtil.4.0.72\build\WixToolset.DUtil.props" Condition="Exists('..\..\packages\WixToolset.DUtil.4.0.72\build\WixToolset.DUtil.props')" />
6
<Import Project="..\..\packages\Microsoft.SourceLink.GitHub.1.0.0\build\Microsoft.SourceLink.GitHub.props" Condition="Exists('..\..\packages\Microsoft.SourceLink.GitHub.1.0.0\build\Microsoft.SourceLink.GitHub.props')" />
7
<Import Project="..\..\packages\Microsoft.SourceLink.Common.1.0.0\build\Microsoft.SourceLink.Common.props" Condition="Exists('..\..\packages\Microsoft.SourceLink.Common.1.0.0\build\Microsoft.SourceLink.Common.props')" />
8
<Import Project="..\..\packages\Microsoft.Build.Tasks.Git.1.0.0\build\Microsoft.Build.Tasks.Git.props" Condition="Exists('..\..\packages\Microsoft.Build.Tasks.Git.1.0.0\build\Microsoft.Build.Tasks.Git.props')" />
@@ -117,6 +117,6 @@
117
<Error Condition="!Exists('..\..\packages\Microsoft.SourceLink.GitHub.1.0.0\build\Microsoft.SourceLink.GitHub.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\Microsoft.SourceLink.GitHub.1.0.0\build\Microsoft.SourceLink.GitHub.props'))" />
118
<Error Condition="!Exists('..\..\packages\Microsoft.SourceLink.GitHub.1.0.0\build\Microsoft.SourceLink.GitHub.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\Microsoft.SourceLink.GitHub.1.0.0\build\Microsoft.SourceLink.GitHub.targets'))" />
119
<Error Condition="!Exists('..\..\packages\Nerdbank.GitVersioning.3.3.37\build\Nerdbank.GitVersioning.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\Nerdbank.GitVersioning.3.3.37\build\Nerdbank.GitVersioning.targets'))" />
120
- <Error Condition="!Exists('..\..\packages\WixToolset.DUtil.4.0.70\build\WixToolset.DUtil.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\WixToolset.DUtil.4.0.70\build\WixToolset.DUtil.props'))" />
120
+ <Error Condition="!Exists('..\..\packages\WixToolset.DUtil.4.0.72\build\WixToolset.DUtil.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\WixToolset.DUtil.4.0.72\build\WixToolset.DUtil.props'))" />
121
</Target>
122
</Project>
\ No newline at end of file
src/test/BurnUnitTest/BurnUnitTest.vcxproj
+8
-8
@@ -3,8 +3,8 @@
3
4
5
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
6
- <Import Project="..\..\..\packages\WixToolset.DUtil.4.0.70\build\WixToolset.DUtil.props" Condition="Exists('..\..\..\packages\WixToolset.DUtil.4.0.70\build\WixToolset.DUtil.props')" />
7
- <Import Project="..\..\..\packages\WixBuildTools.TestSupport.Native.4.0.47\build\WixBuildTools.TestSupport.Native.props" Condition="Exists('..\..\..\packages\WixBuildTools.TestSupport.Native.4.0.47\build\WixBuildTools.TestSupport.Native.props')" />
6
+ <Import Project="..\..\..\packages\WixToolset.DUtil.4.0.72\build\WixToolset.DUtil.props" Condition="Exists('..\..\..\packages\WixToolset.DUtil.4.0.72\build\WixToolset.DUtil.props')" />
7
+ <Import Project="..\..\..\packages\WixBuildTools.TestSupport.Native.4.0.50\build\WixBuildTools.TestSupport.Native.props" Condition="Exists('..\..\..\packages\WixBuildTools.TestSupport.Native.4.0.50\build\WixBuildTools.TestSupport.Native.props')" />
8
<ItemGroup Label="ProjectConfigurations">
9
<ProjectConfiguration Include="Debug|ARM64">
10
<Configuration>Debug</Configuration>
@@ -78,10 +78,10 @@
78
<Reference Include="System" />
79
<Reference Include="System.Core" />
80
<Reference Include="WixBuildTools.TestSupport">
81
- <HintPath>..\..\..\packages\WixBuildTools.TestSupport.4.0.47\lib\net472\WixBuildTools.TestSupport.dll</HintPath>
81
+ <HintPath>..\..\..\packages\WixBuildTools.TestSupport.4.0.50\lib\net472\WixBuildTools.TestSupport.dll</HintPath>
82
</Reference>
83
<Reference Include="WixBuildTools.TestSupport.Native">
84
- <HintPath>..\..\..\packages\WixBuildTools.TestSupport.Native.4.0.47\lib\net472\WixBuildTools.TestSupport.Native.dll</HintPath>
84
+ <HintPath>..\..\..\packages\WixBuildTools.TestSupport.Native.4.0.50\lib\net472\WixBuildTools.TestSupport.Native.dll</HintPath>
85
</Reference>
86
</ItemGroup>
87
<ItemGroup>
@@ -90,13 +90,13 @@
90
</ProjectReference>
91
</ItemGroup>
92
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
93
- <Import Project="..\..\..\packages\WixBuildTools.TestSupport.Native.4.0.47\build\WixBuildTools.TestSupport.Native.targets" Condition="Exists('..\..\..\packages\WixBuildTools.TestSupport.Native.4.0.47\build\WixBuildTools.TestSupport.Native.targets')" />
93
+ <Import Project="..\..\..\packages\WixBuildTools.TestSupport.Native.4.0.50\build\WixBuildTools.TestSupport.Native.targets" Condition="Exists('..\..\..\packages\WixBuildTools.TestSupport.Native.4.0.50\build\WixBuildTools.TestSupport.Native.targets')" />
94
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
95
<PropertyGroup>
96
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
97
</PropertyGroup>
98
- <Error Condition="!Exists('..\..\..\packages\WixBuildTools.TestSupport.Native.4.0.47\build\WixBuildTools.TestSupport.Native.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\..\packages\WixBuildTools.TestSupport.Native.4.0.47\build\WixBuildTools.TestSupport.Native.props'))" />
99
- <Error Condition="!Exists('..\..\..\packages\WixBuildTools.TestSupport.Native.4.0.47\build\WixBuildTools.TestSupport.Native.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\..\packages\WixBuildTools.TestSupport.Native.4.0.47\build\WixBuildTools.TestSupport.Native.targets'))" />
100
- <Error Condition="!Exists('..\..\..\packages\WixToolset.DUtil.4.0.70\build\WixToolset.DUtil.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\..\packages\WixToolset.DUtil.4.0.70\build\WixToolset.DUtil.props'))" />
98
+ <Error Condition="!Exists('..\..\..\packages\WixBuildTools.TestSupport.Native.4.0.50\build\WixBuildTools.TestSupport.Native.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\..\packages\WixBuildTools.TestSupport.Native.4.0.50\build\WixBuildTools.TestSupport.Native.props'))" />
99
+ <Error Condition="!Exists('..\..\..\packages\WixBuildTools.TestSupport.Native.4.0.50\build\WixBuildTools.TestSupport.Native.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\..\packages\WixBuildTools.TestSupport.Native.4.0.50\build\WixBuildTools.TestSupport.Native.targets'))" />
100
+ <Error Condition="!Exists('..\..\..\packages\WixToolset.DUtil.4.0.72\build\WixToolset.DUtil.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\..\packages\WixToolset.DUtil.4.0.72\build\WixToolset.DUtil.props'))" />
101
</Target>
102
</Project>
\ No newline at end of file
src/test/BurnUnitTest/packages.config
+3
-3
@@ -1,9 +1,9 @@
1
<?xml version="1.0" encoding="utf-8"?>
2
<!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. -->
3
<packages>
4
- <package id="WixBuildTools.TestSupport" version="4.0.47" />
5
- <package id="WixBuildTools.TestSupport.Native" version="4.0.47" />
6
- <package id="WixToolset.DUtil" version="4.0.70" targetFramework="native" />
4
+ <package id="WixBuildTools.TestSupport" version="4.0.50" />
5
+ <package id="WixBuildTools.TestSupport.Native" version="4.0.50" />
6
+ <package id="WixToolset.DUtil" version="4.0.72" targetFramework="native" />
7
<package id="xunit.abstractions" version="2.0.3" />
8
<package id="xunit.assert" version="2.4.1" />
9
<package id="xunit.core" version="2.4.1" />