summaryrefslogtreecommitdiff
path: root/src/libs/dutil/WixToolset.DUtil/strutil.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/libs/dutil/WixToolset.DUtil/strutil.cpp')
-rw-r--r--src/libs/dutil/WixToolset.DUtil/strutil.cpp32
1 files changed, 16 insertions, 16 deletions
diff --git a/src/libs/dutil/WixToolset.DUtil/strutil.cpp b/src/libs/dutil/WixToolset.DUtil/strutil.cpp
index a483cf54..0a00c690 100644
--- a/src/libs/dutil/WixToolset.DUtil/strutil.cpp
+++ b/src/libs/dutil/WixToolset.DUtil/strutil.cpp
@@ -80,7 +80,7 @@ extern "C" HRESULT DAPI StrAllocSecure(
80 80
81/******************************************************************** 81/********************************************************************
82AllocHelper - allocates or reuses dynamic string memory 82AllocHelper - allocates or reuses dynamic string memory
83If fZeroOnRealloc is true and the memory needs to reallocated, 83If fZeroOnRealloc is true and the memory needs to reallocated,
84calls SecureZeroMemory on original block of memory after it is moved. 84calls SecureZeroMemory on original block of memory after it is moved.
85 85
86NOTE: caller is responsible for freeing ppwz even if function fails 86NOTE: caller is responsible for freeing ppwz even if function fails
@@ -350,8 +350,8 @@ extern "C" HRESULT DAPI StrAllocString(
350} 350}
351 351
352/******************************************************************** 352/********************************************************************
353StrAllocStringSecure - allocates or reuses dynamic string memory and 353StrAllocStringSecure - allocates or reuses dynamic string memory and
354copies in an existing string. If the memory needs to reallocated, 354copies in an existing string. If the memory needs to reallocated,
355calls SecureZeroMemory on original block of memory after it is moved. 355calls SecureZeroMemory on original block of memory after it is moved.
356 356
357NOTE: caller is responsible for freeing ppwz even if function fails 357NOTE: caller is responsible for freeing ppwz even if function fails
@@ -369,7 +369,7 @@ extern "C" HRESULT DAPI StrAllocStringSecure(
369 369
370/******************************************************************** 370/********************************************************************
371AllocStringHelper - allocates or reuses dynamic string memory and copies in an existing string 371AllocStringHelper - allocates or reuses dynamic string memory and copies in an existing string
372If fZeroOnRealloc is true and the memory needs to reallocated, 372If fZeroOnRealloc is true and the memory needs to reallocated,
373calls SecureZeroMemory on original block of memory after it is moved. 373calls SecureZeroMemory on original block of memory after it is moved.
374 374
375NOTE: caller is responsible for freeing ppwz even if function fails 375NOTE: caller is responsible for freeing ppwz even if function fails
@@ -623,7 +623,7 @@ LExit:
623 623
624 624
625/******************************************************************** 625/********************************************************************
626StrAllocPrefix - allocates or reuses dynamic string memory and 626StrAllocPrefix - allocates or reuses dynamic string memory and
627 prefixes a string 627 prefixes a string
628 628
629NOTE: caller is responsible for freeing ppwz even if function fails 629NOTE: caller is responsible for freeing ppwz even if function fails
@@ -703,8 +703,8 @@ extern "C" HRESULT DAPI StrAllocConcat(
703 703
704 704
705/******************************************************************** 705/********************************************************************
706StrAllocConcatSecure - allocates or reuses dynamic string memory and 706StrAllocConcatSecure - allocates or reuses dynamic string memory and
707adds an existing string. If the memory needs to reallocated, calls 707adds an existing string. If the memory needs to reallocated, calls
708SecureZeroMemory on the original block of memory after it is moved. 708SecureZeroMemory on the original block of memory after it is moved.
709 709
710NOTE: caller is responsible for freeing ppwz even if function fails 710NOTE: caller is responsible for freeing ppwz even if function fails
@@ -723,7 +723,7 @@ extern "C" HRESULT DAPI StrAllocConcatSecure(
723 723
724/******************************************************************** 724/********************************************************************
725AllocConcatHelper - allocates or reuses dynamic string memory and adds an existing string 725AllocConcatHelper - allocates or reuses dynamic string memory and adds an existing string
726If fZeroOnRealloc is true and the memory needs to reallocated, 726If fZeroOnRealloc is true and the memory needs to reallocated,
727calls SecureZeroMemory on original block of memory after it is moved. 727calls SecureZeroMemory on original block of memory after it is moved.
728 728
729NOTE: caller is responsible for freeing ppwz even if function fails 729NOTE: caller is responsible for freeing ppwz even if function fails
@@ -940,7 +940,7 @@ LExit:
940 940
941 941
942/******************************************************************** 942/********************************************************************
943StrAllocFormattedSecure - allocates or reuses dynamic string memory 943StrAllocFormattedSecure - allocates or reuses dynamic string memory
944and formats it. If the memory needs to be reallocated, 944and formats it. If the memory needs to be reallocated,
945calls SecureZeroMemory on original block of memory after it is moved. 945calls SecureZeroMemory on original block of memory after it is moved.
946 946
@@ -990,7 +990,7 @@ extern "C" HRESULT DAPI StrAnsiAllocFormatted(
990 990
991 991
992/******************************************************************** 992/********************************************************************
993StrAllocFormattedArgs - allocates or reuses dynamic string memory 993StrAllocFormattedArgs - allocates or reuses dynamic string memory
994and formats it with the passed in args 994and formats it with the passed in args
995 995
996NOTE: caller is responsible for freeing ppwz even if function fails 996NOTE: caller is responsible for freeing ppwz even if function fails
@@ -1009,7 +1009,7 @@ extern "C" HRESULT DAPI StrAllocFormattedArgs(
1009StrAllocFormattedArgsSecure - allocates or reuses dynamic string memory 1009StrAllocFormattedArgsSecure - allocates or reuses dynamic string memory
1010and formats it with the passed in args. 1010and formats it with the passed in args.
1011 1011
1012If the memory needs to reallocated, calls SecureZeroMemory on the 1012If the memory needs to reallocated, calls SecureZeroMemory on the
1013original block of memory after it is moved. 1013original block of memory after it is moved.
1014 1014
1015NOTE: caller is responsible for freeing ppwz even if function fails 1015NOTE: caller is responsible for freeing ppwz even if function fails
@@ -1028,7 +1028,7 @@ extern "C" HRESULT DAPI StrAllocFormattedArgsSecure(
1028AllocFormattedArgsHelper - allocates or reuses dynamic string memory 1028AllocFormattedArgsHelper - allocates or reuses dynamic string memory
1029and formats it with the passed in args. 1029and formats it with the passed in args.
1030 1030
1031If fZeroOnRealloc is true and the memory needs to reallocated, 1031If fZeroOnRealloc is true and the memory needs to reallocated,
1032calls SecureZeroMemory on original block of memory after it is moved. 1032calls SecureZeroMemory on original block of memory after it is moved.
1033 1033
1034NOTE: caller is responsible for freeing ppwz even if function fails 1034NOTE: caller is responsible for freeing ppwz even if function fails
@@ -1108,7 +1108,7 @@ LExit:
1108 1108
1109 1109
1110/******************************************************************** 1110/********************************************************************
1111StrAnsiAllocFormattedArgs - allocates or reuses dynamic ANSI string memory 1111StrAnsiAllocFormattedArgs - allocates or reuses dynamic ANSI string memory
1112and formats it with the passed in args 1112and formats it with the passed in args
1113 1113
1114NOTE: caller is responsible for freeing ppsz even if function fails 1114NOTE: caller is responsible for freeing ppsz even if function fails
@@ -1946,7 +1946,7 @@ extern "C" HRESULT DAPI MultiSzPrepend(
1946 // Allocate the result buffer 1946 // Allocate the result buffer
1947 hr = StrAlloc(&pwzResult, cchResult + 1); 1947 hr = StrAlloc(&pwzResult, cchResult + 1);
1948 StrExitOnFailure(hr, "failed to allocate result string"); 1948 StrExitOnFailure(hr, "failed to allocate result string");
1949 1949
1950 // Prepend 1950 // Prepend
1951 hr = ::StringCchCopyW(pwzResult, cchResult, pwzInsert); 1951 hr = ::StringCchCopyW(pwzResult, cchResult, pwzInsert);
1952 StrExitOnRootFailure(hr, "failed to copy prepend string: %ls", pwzInsert); 1952 StrExitOnRootFailure(hr, "failed to copy prepend string: %ls", pwzInsert);
@@ -2395,7 +2395,7 @@ extern "C" HRESULT DAPI StrStringToUInt16(
2395 ULONGLONG ull = 0; 2395 ULONGLONG ull = 0;
2396 2396
2397 hr = StrStringToUInt64(wzIn, cchIn, &ull); 2397 hr = StrStringToUInt64(wzIn, cchIn, &ull);
2398 StrExitOnFailure(hr, "Failed to parse uint64."); 2398 StrExitOnFailure(hr, "Failed to parse uint64 to convert to uint16.");
2399 2399
2400 if (USHORT_MAX < ull) 2400 if (USHORT_MAX < ull)
2401 { 2401 {
@@ -2447,7 +2447,7 @@ extern "C" HRESULT DAPI StrStringToUInt32(
2447 ULONGLONG ull = 0; 2447 ULONGLONG ull = 0;
2448 2448
2449 hr = StrStringToUInt64(wzIn, cchIn, &ull); 2449 hr = StrStringToUInt64(wzIn, cchIn, &ull);
2450 StrExitOnFailure(hr, "Failed to parse uint64."); 2450 StrExitOnFailure(hr, "Failed to parse uint64 to convert to uint32.");
2451 2451
2452 if (UINT_MAX < ull) 2452 if (UINT_MAX < ull)
2453 { 2453 {