A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/python/cpython/commit/561c59777c8426fde0ef48b57cf02eddaeb2a5b8 below:

Avoid unsafe DLL load on Windows 7 and earlier (GH-1… · python/cpython@561c597 · GitHub

File tree Expand file treeCollapse file tree 3 files changed

+15

-4

lines changed

Filter options

Expand file treeCollapse file tree 3 files changed

+15

-4

lines changed Original file line number Diff line number Diff line change

@@ -0,0 +1 @@

1 +

Avoid unsafe load of ``api-ms-win-core-path-l1-1-0.dll`` at startup on Windows 7.

Original file line number Diff line number Diff line change

@@ -245,7 +245,8 @@ static void

245 245

join(wchar_t *buffer, const wchar_t *stuff)

246 246

{

247 247

if (_PathCchCombineEx_Initialized == 0) {

248 -

HMODULE pathapi = LoadLibraryW(L"api-ms-win-core-path-l1-1-0.dll");

248 +

HMODULE pathapi = LoadLibraryExW(L"api-ms-win-core-path-l1-1-0.dll", NULL,

249 +

LOAD_LIBRARY_SEARCH_SYSTEM32);

249 250

if (pathapi) {

250 251

_PathCchCombineEx = (PPathCchCombineEx)GetProcAddress(pathapi, "PathCchCombineEx");

251 252

}

@@ -278,7 +279,8 @@ static _PyInitError canonicalize(wchar_t *buffer, const wchar_t *path)

278 279

}

279 280 280 281

if (_PathCchCanonicalizeEx_Initialized == 0) {

281 -

HMODULE pathapi = LoadLibraryW(L"api-ms-win-core-path-l1-1-0.dll");

282 +

HMODULE pathapi = LoadLibraryExW(L"api-ms-win-core-path-l1-1-0.dll", NULL,

283 +

LOAD_LIBRARY_SEARCH_SYSTEM32);

282 284

if (pathapi) {

283 285

_PathCchCanonicalizeEx = (PPathCchCanonicalizeEx)GetProcAddress(pathapi, "PathCchCanonicalizeEx");

284 286

}

Original file line number Diff line number Diff line change

@@ -3028,8 +3028,16 @@ class PythonBootstrapperApplication : public CBalBaseBootstrapperApplication {

3028 3028

}

3029 3029

} else {

3030 3030

if (IsWindows7SP1OrGreater()) {

3031 -

BalLog(BOOTSTRAPPER_LOG_LEVEL_STANDARD, "Target OS is Windows 7 SP1 or later");

3032 -

return;

3031 +

HMODULE hKernel32 = GetModuleHandleW(L"kernel32");

3032 +

if (hKernel32 && !GetProcAddress(hKernel32, "AddDllDirectory")) {

3033 +

BalLog(BOOTSTRAPPER_LOG_LEVEL_ERROR, "Detected Windows 7 SP1 without KB2533623");

3034 +

BalLog(BOOTSTRAPPER_LOG_LEVEL_ERROR, "KB2533623 update is required to continue.");

3035 +

/* The "MissingSP1" error also specifies updates are required */

3036 +

LocGetString(_wixLoc, L"#(loc.FailureWin7MissingSP1)", &pLocString);

3037 +

} else {

3038 +

BalLog(BOOTSTRAPPER_LOG_LEVEL_STANDARD, "Target OS is Windows 7 SP1 or later");

3039 +

return;

3040 +

}

3033 3041

} else if (IsWindows7OrGreater()) {

3034 3042

BalLog(BOOTSTRAPPER_LOG_LEVEL_ERROR, "Detected Windows 7 RTM");

3035 3043

BalLog(BOOTSTRAPPER_LOG_LEVEL_ERROR, "Service Pack 1 is required to continue installation");

You can’t perform that action at this time.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4