Fred Drake 4c82b2366f Trent Mick <trentm@activestate.com>:
This patch fixes possible overflow in the use of
PyOS_GetLastModificationTime in getmtime.c and Python/import.c.

Currently PyOS_GetLastModificationTime returns a C long. This can
overflow on Win64 where sizeof(time_t) > sizeof(long). Besides it
should logically return a time_t anyway (this patch changes this).

As well, import.c uses PyOS_GetLastModificationTime for .pyc
timestamping.  There has been recent discussion about the .pyc header
format on python-dev.  This patch adds oveflow checking to import.c so
that an exception will be raised if the modification time
overflows. There are a few other minor 64-bit readiness changes made
to the module as well:

- size_t instead of int or long for function-local buffer and string
length variables

- one buffer overflow check was added (raises an exception on possible
overflow, this overflow chance exists on 32-bit platforms as well), no
other possible buffer overflows existed (from my analysis anyway)

Closes SourceForge patch #100509.
2000-06-30 16:18:57 +00:00
..
2000-05-02 18:34:30 +00:00
1996-10-25 14:44:06 +00:00
2000-06-28 21:12:25 +00:00
1994-08-29 10:43:12 +00:00
1999-12-22 14:09:35 +00:00
1999-12-22 14:09:35 +00:00
1999-12-22 14:09:35 +00:00
1996-10-25 14:44:06 +00:00
2000-06-28 23:53:56 +00:00
1997-07-19 19:48:41 +00:00
1997-07-19 19:48:41 +00:00
1996-08-29 18:10:41 +00:00
2000-06-30 16:18:57 +00:00
1999-12-22 14:09:35 +00:00
1999-06-18 14:22:24 +00:00