Commit graph

13 commits

Author SHA1 Message Date
Thomas Heller 1df04617b7 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.

Already backported to the 2.3 branch.
2004-07-02 08:53:57 +00:00
Fred Drake e20131efc3 Fix a couple of whitespace consistency nits. 2002-08-26 21:20:30 +00:00
Martin v. Löwis 6238d2b024 Patch #569753: Remove support for WIN16.
Rename all occurrences of MS_WIN32 to MS_WINDOWS.
2002-06-30 15:26:10 +00:00
Jeremy Hylton 518ab1c02a Use PyOS_snprintf instead of sprintf. 2001-11-28 20:42:20 +00:00
Marc-André Lemburg d4c0a9c59b Fixes for possible buffer overflows in sprintf() usages. 2001-11-28 11:47:00 +00:00
Mark Hammond fb1f68ed7c Always pass a full path name to LoadLibraryEx(). Fixes some Windows 9x problems. As discussed on python-dev 2001-05-09 00:50:59 +00:00
Mark Hammond 1f7838bcc0 Detect conflicting Python DLL on module import under Windows - as per [ Patch #101676 ] 2000-10-05 10:54:45 +00:00
Guido van Rossum 8586991099 REMOVED all CWI, CNRI and BeOpen copyright markings.
This should match the situation in the 1.6b1 tree.
2000-09-01 23:29:29 +00:00
Guido van Rossum ffcc3813d8 Change copyright notice - 2nd try. 2000-06-30 23:58:06 +00:00
Guido van Rossum fd71b9e9d4 Change copyright notice. 2000-06-30 23:50:40 +00:00
Guido van Rossum 582acece2e Trent Mick's Win64 changes: size_t vs. int or long; also some overflow
tests.
2000-06-28 22:07:35 +00:00
Guido van Rossum 96a8fb7e99 Cleanup patches from Greg Stein:
* in import.c, #ifdef out references to dynamic loading based on
  HAVE_DYNAMIC_LOADING

* clean out the platform-specific crud from importdl.c.
  [ maybe fold this function into import.c and drop the importdl.c file? Greg.]

* change GetDynLoadFunc's "funcname" parameter to "shortname". change
  "name" to "fqname" for clarification.

* each GetDynLoadFunc now creates its own funcname value.

  WARNING: as I mentioned previously, we may run into an issue with a
  missing "_" on some platforms. Testing will show this pretty quickly,
  however.

* move pathname munging into dynload_shlib.c
1999-12-22 14:09:35 +00:00
Guido van Rossum 22a1d3671b The old platform-specific contents of importdl.c, broken down into one
file per platform (really: per style of Dl API; e.g. all platforms
using dlopen() are grouped together in dynload_shlib.c.).

This is part of a set of patches by Greg Stein.
1999-12-20 21:18:49 +00:00