]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
When importing an extension on Windows, the code reads the PE 'import
authorThomas Heller <theller@ctypes.org>
Fri, 2 Jul 2004 08:37:35 +0000 (08:37 +0000)
committerThomas Heller <theller@ctypes.org>
Fri, 2 Jul 2004 08:37:35 +0000 (08:37 +0000)
commitdd6acdeda68901f280cce8a3aadcf02307115bb9
treea1e981a1eb5ac72a221d838808a67fe6dd69bb6d
parenta2fd2a33c6a44b9c12cddd510ac73bddc48bad7b
When importing an extension on Windows, the code reads the PE 'import
table' of the dll, to make sure that the dll really was build for the
correct Python version.  It does this by looking for an entry
'pythonXY.dll' (X.Y is the Python version number).

The code now checks the size of the dll's import table before reading
entries from it.  Before this patch, the code crashed trying to read
the import table when the size was zero (as in Win2k's wmi.dll, for
example).

Look for imports of 'pythonXY_d.dll' in a debug build instead of
'pythonXY.dll'.

Fixes SF 951851: Crash when reading "import table" of certain windows dlls.
Python/dynload_win.c