]> granicus.if.org Git - python/commitdiff
Issue #23619: Ensure C variable is initialized before using it.
authorSteve Dower <steve.dower@microsoft.com>
Mon, 9 Mar 2015 17:05:50 +0000 (10:05 -0700)
committerSteve Dower <steve.dower@microsoft.com>
Mon, 9 Mar 2015 17:05:50 +0000 (10:05 -0700)
The garbage in _crtInstalledToken was causing the IsCrtInstalled() function to return TRUE without actually checking anything. We now initialize the variable first.

Tools/msi/bundle/bootstrap/PythonBootstrapperApplication.cpp

index d090443cf60c608f83d1df983de39be382d050c5..547c9b8822a2b5956f97d4a1667f76400aaadeaf 100644 (file)
@@ -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;