A RetroSearch Logo

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

Search Query:

Showing content from https://github.com/python/cpython/commit/51332c467ed2e07a191f903d554d0c54248e4d88 below:

Avoid unsafe DLL load on Windows 7 and earlier (GH-1… · python/cpython@51332c4 · 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

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

224 224

join(wchar_t *buffer, const wchar_t *stuff)

225 225

{

226 226

if (_PathCchCombineEx_Initialized == 0) {

227 -

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

227 +

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

228 +

LOAD_LIBRARY_SEARCH_SYSTEM32);

228 229

if (pathapi)

229 230

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

230 231

else

@@ -249,7 +250,8 @@ static PPathCchCanonicalizeEx _PathCchCanonicalizeEx;

249 250

static void canonicalize(wchar_t *buffer, const wchar_t *path)

250 251

{

251 252

if (_PathCchCanonicalizeEx_Initialized == 0) {

252 -

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

253 +

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

254 +

LOAD_LIBRARY_SEARCH_SYSTEM32);

253 255

if (pathapi) {

254 256

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

255 257

}

Original file line number Diff line number Diff line change

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

3042 3042

}

3043 3043

} else {

3044 3044

if (IsWindows7SP1OrGreater()) {

3045 -

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

3046 -

return;

3045 +

HMODULE hKernel32 = GetModuleHandleW(L"kernel32");

3046 +

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

3047 +

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

3048 +

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

3049 +

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

3050 +

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

3051 +

} else {

3052 +

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

3053 +

return;

3054 +

}

3047 3055

} else if (IsWindows7OrGreater()) {

3048 3056

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

3049 3057

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