• Fred Drake's avatar
    Trent Mick <trentm@activestate.com>: · 4c82b236
    Fred Drake yazdı
    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.
    4c82b236
Adı
Son kayıt (commit)
Son güncelleme
BeOS Loading commit data...
Demo Loading commit data...
Doc Loading commit data...
Grammar Loading commit data...
Include Loading commit data...
Lib Loading commit data...
Mac Loading commit data...
Misc Loading commit data...
Modules Loading commit data...
Objects Loading commit data...
PC Loading commit data...
PCbuild Loading commit data...
Parser Loading commit data...
Python Loading commit data...
Tools Loading commit data...
.cvsignore Loading commit data...
.hgtags Loading commit data...
Makefile.in Loading commit data...
README Loading commit data...
acconfig.h Loading commit data...
config.h.in Loading commit data...
configure Loading commit data...
configure.in Loading commit data...
install-sh Loading commit data...