diff options
author | Sean Hall <r.sean.hall@gmail.com> | 2020-05-22 16:46:39 +1000 |
---|---|---|
committer | Sean Hall <r.sean.hall@gmail.com> | 2020-05-22 16:50:02 +1000 |
commit | 796a20134cdec2a408b8256dc307f55d2c75aa7d (patch) | |
tree | bdbb185a7d07877d36a0b4721b7aeb77cd2e5f78 | |
parent | 16adec219be367dcdad5d2e45df089385a8d9827 (diff) | |
download | wix-796a20134cdec2a408b8256dc307f55d2c75aa7d.tar.gz wix-796a20134cdec2a408b8256dc307f55d2c75aa7d.tar.bz2 wix-796a20134cdec2a408b8256dc307f55d2c75aa7d.zip |
WIXBUG:3813 For "All Unassigned" set the binding to '*'.
-rw-r--r-- | src/ca/scaweb7.cpp | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/src/ca/scaweb7.cpp b/src/ca/scaweb7.cpp index e1893782..3ee781f2 100644 --- a/src/ca/scaweb7.cpp +++ b/src/ca/scaweb7.cpp | |||
@@ -828,16 +828,16 @@ static HRESULT ScaWebWrite7( | |||
828 | } | 828 | } |
829 | 829 | ||
830 | // set the IP address appropriately | 830 | // set the IP address appropriately |
831 | if (0 == wcscmp(psw->swaBinding.wzIP, L"*")) | 831 | if (0 == wcscmp(psw->swaBinding.wzIP, L"")) |
832 | { | 832 | { |
833 | ::ZeroMemory(wzIP, sizeof(wzIP)); | 833 | hr = ::StringCchCopyW(wzIP, countof(wzIP), L"*"); // if no IP specified = add * |
834 | } | 834 | } |
835 | else | 835 | else |
836 | { | 836 | { |
837 | #pragma prefast(suppress:26037, "Source string is null terminated - it is populated as target of ::StringCchCopyW") | 837 | #pragma prefast(suppress:26037, "Source string is null terminated - it is populated as target of ::StringCchCopyW") |
838 | hr = ::StringCchCopyW(wzIP, countof(wzIP), psw->swaBinding.wzIP); | 838 | hr = ::StringCchCopyW(wzIP, countof(wzIP), psw->swaBinding.wzIP); // else leave untouched |
839 | ExitOnFailure(hr, "Failed to copy IP string"); | ||
840 | } | 839 | } |
840 | ExitOnFailure(hr, "Failed to copy IP string"); | ||
841 | 841 | ||
842 | hr = ::StringCchPrintfW(wzBinding, countof(wzBinding), L"%s:%d:%s", wzIP, psw->swaBinding.iPort, psw->swaBinding.wzHeader); | 842 | hr = ::StringCchPrintfW(wzBinding, countof(wzBinding), L"%s:%d:%s", wzIP, psw->swaBinding.iPort, psw->swaBinding.wzHeader); |
843 | ExitOnFailure(hr, "Failed to format IP:Port:Header binding string"); | 843 | ExitOnFailure(hr, "Failed to format IP:Port:Header binding string"); |
@@ -849,16 +849,17 @@ static HRESULT ScaWebWrite7( | |||
849 | for (ui = 0; (ui < MAX_ADDRESSES_PER_WEB) && (ui < psw->cExtraAddresses); ++ui) | 849 | for (ui = 0; (ui < MAX_ADDRESSES_PER_WEB) && (ui < psw->cExtraAddresses); ++ui) |
850 | { | 850 | { |
851 | // set the IP address appropriately | 851 | // set the IP address appropriately |
852 | if (0 == wcscmp(psw->swaExtraAddresses[ui].wzIP, L"*")) | 852 | if (0 == wcscmp(psw->swaExtraAddresses[ui].wzIP, L"")) |
853 | { | 853 | { |
854 | ::ZeroMemory(wzIP, sizeof(wzIP)); | 854 | hr = ::StringCchCopyW(wzIP, countof(wzIP), L"*"); // if no IP specified = add * |
855 | } | 855 | } |
856 | else | 856 | else |
857 | { | 857 | { |
858 | #pragma prefast(suppress:26037, "Source string is null terminated - it is populated as target of ::StringCchCopyW") | 858 | #pragma prefast(suppress:26037, "Source string is null terminated - it is populated as target of ::StringCchCopyW") |
859 | hr = ::StringCchCopyW(wzIP, countof(wzIP), psw->swaExtraAddresses[ui].wzIP); | 859 | hr = ::StringCchCopyW(wzIP, countof(wzIP), psw->swaExtraAddresses[ui].wzIP); //else leave untouched |
860 | ExitOnFailure(hr, "Failed to copy web IP"); | ||
861 | } | 860 | } |
861 | ExitOnFailure(hr, "Failed to copy web IP string"); | ||
862 | |||
862 | hr = ::StringCchPrintfW(wzBinding, countof(wzBinding), L"%s:%d:%s", wzIP, psw->swaExtraAddresses[ui].iPort, psw->swaExtraAddresses[ui].wzHeader); | 863 | hr = ::StringCchPrintfW(wzBinding, countof(wzBinding), L"%s:%d:%s", wzIP, psw->swaExtraAddresses[ui].iPort, psw->swaExtraAddresses[ui].wzHeader); |
863 | ExitOnFailure(hr, "Failed to copy web IP"); | 864 | ExitOnFailure(hr, "Failed to copy web IP"); |
864 | 865 | ||