[issue19883] Integer overflow in zipimport.c
STINNER Victor
report at bugs.python.org
Sun Dec 8 12:10:28 CET 2013
STINNER Victor added the comment:
Here is a work-in-progress patch.
PyMarshal_ReadShortFromFile() and PyMarshal_ReadLongFromFile() are still wrong: new Unsigned version should be added to marshal.c. I don't know if a C cast to unsigned is enough because long can be larger than 32-bit (ex: on Linux 64-bit):
#if SIZEOF_LONG > 4
/* Sign extension for 64-bit machines */
x |= -(x & 0x80000000L);
#endif
I didn't test my patch. Anyone interested to finish the patch?
----------
Added file: http://bugs.python.org/file33044/zipimport_int_overflow.patch
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue19883>
_______________________________________
More information about the Python-bugs-list
mailing list