diff options
author | Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> | 2020-07-06 17:12:16 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-07-06 17:12:16 (GMT) |
commit | aa7f7756149a10c64d01f583b71e91814db886ab (patch) | |
tree | 2423c988772967d5090089f00550749ecde9b02d /PCbuild | |
parent | 6790f9badda47c7aa0fe4b0b5f090d6ca0c477d5 (diff) | |
download | cpython-aa7f7756149a10c64d01f583b71e91814db886ab.zip cpython-aa7f7756149a10c64d01f583b71e91814db886ab.tar.gz cpython-aa7f7756149a10c64d01f583b71e91814db886ab.tar.bz2 |
bpo-29778: Ensure python3.dll is loaded from correct locations when Python is embedded (GH-21297) (GH-21352)
Also enables using debug build of `python3_d.dll`
Reference: CVE-2020-15523
(cherry picked from commit dcbaa1b49cd9062fb9ba2b9d49555ac6cd8c60b5)
Co-authored-by: Steve Dower <steve.dower@python.org>
Diffstat (limited to 'PCbuild')
-rw-r--r-- | PCbuild/pyproject.props | 3 | ||||
-rw-r--r-- | PCbuild/python.props | 2 |
2 files changed, 4 insertions, 1 deletions
diff --git a/PCbuild/pyproject.props b/PCbuild/pyproject.props index 59f2df4..360b4ed 100644 --- a/PCbuild/pyproject.props +++ b/PCbuild/pyproject.props @@ -26,11 +26,12 @@ <_PlatformPreprocessorDefinition>_WIN32;</_PlatformPreprocessorDefinition> <_PlatformPreprocessorDefinition Condition="$(Platform) == 'x64'">_WIN64;_M_X64;</_PlatformPreprocessorDefinition> <_PydPreprocessorDefinition Condition="$(TargetExt) == '.pyd'">Py_BUILD_CORE_MODULE;</_PydPreprocessorDefinition> + <_Py3NamePreprocessorDefinition>PY3_DLLNAME=L"$(Py3DllName)";</_Py3NamePreprocessorDefinition> </PropertyGroup> <ItemDefinitionGroup> <ClCompile> <AdditionalIncludeDirectories>$(PySourcePath)Include;$(PySourcePath)Include\internal;$(PySourcePath)PC;$(IntDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions>WIN32;$(_PlatformPreprocessorDefinition)$(_DebugPreprocessorDefinition)$(_PydPreprocessorDefinition)%(PreprocessorDefinitions)</PreprocessorDefinitions> + <PreprocessorDefinitions>WIN32;$(_Py3NamePreprocessorDefinition);$(_PlatformPreprocessorDefinition)$(_DebugPreprocessorDefinition)$(_PydPreprocessorDefinition)%(PreprocessorDefinitions)</PreprocessorDefinitions> <Optimization>MaxSpeed</Optimization> <IntrinsicFunctions>true</IntrinsicFunctions> diff --git a/PCbuild/python.props b/PCbuild/python.props index 6388d1b..bf6f371 100644 --- a/PCbuild/python.props +++ b/PCbuild/python.props @@ -203,6 +203,8 @@ <!-- The name of the resulting pythonXY.dll (without the extension) --> <PyDllName>python$(MajorVersionNumber)$(MinorVersionNumber)$(PyDebugExt)</PyDllName> + <!-- The name of the resulting pythonX.dll (without the extension) --> + <Py3DllName>python3$(PyDebugExt)</Py3DllName> <!-- The version and platform tag to include in .pyd filenames --> <PydTag Condition="$(ArchName) == 'win32'">.cp$(MajorVersionNumber)$(MinorVersionNumber)-win32</PydTag> |