summaryrefslogtreecommitdiff
path: root/Tools/msi/bundle/bootstrap/PythonBootstrapperApplication.cpp
diff options
context:
space:
mode:
authorSteve Dower <steve.dower@microsoft.com>2015-03-09 10:05:50 -0700
committerSteve Dower <steve.dower@microsoft.com>2015-03-09 10:05:50 -0700
commitff9bda8c39c8cbda4712c7c4598fbea536b1abd6 (patch)
treeceafe35508627081561fb79ab0fced39056e1590 /Tools/msi/bundle/bootstrap/PythonBootstrapperApplication.cpp
parenteeff4b8180065e14055da89e03b3c45f527f2726 (diff)
downloadcpython-ff9bda8c39c8cbda4712c7c4598fbea536b1abd6.tar.gz
Issue #23619: Ensure C variable is initialized before using it.
The garbage in _crtInstalledToken was causing the IsCrtInstalled() function to return TRUE without actually checking anything. We now initialize the variable first.
Diffstat (limited to 'Tools/msi/bundle/bootstrap/PythonBootstrapperApplication.cpp')
-rw-r--r--Tools/msi/bundle/bootstrap/PythonBootstrapperApplication.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/Tools/msi/bundle/bootstrap/PythonBootstrapperApplication.cpp b/Tools/msi/bundle/bootstrap/PythonBootstrapperApplication.cpp
index d090443cf6..547c9b8822 100644
--- a/Tools/msi/bundle/bootstrap/PythonBootstrapperApplication.cpp
+++ b/Tools/msi/bundle/bootstrap/PythonBootstrapperApplication.cpp
@@ -2574,6 +2574,7 @@ public:
}
}
+ _crtInstalledToken = -1;
pEngine->SetVariableNumeric(L"CRTInstalled", IsCrtInstalled() ? 1 : 0);
_wixLoc = nullptr;
@@ -2603,8 +2604,6 @@ public:
_suppressRepair = FALSE;
_modifying = FALSE;
- _crtInstalledToken = -1;
-
_overridableVariables = nullptr;
_taskbarList = nullptr;
_taskbarButtonCreatedMessage = UINT_MAX;