[issue2586] Integer signedness bugs in zlib modules

Justin Ferguson report at bugs.python.org
Tue Apr 8 18:49:18 CEST 2008


Justin Ferguson <justin.ferguson at ioactive.com> added the comment:

Just so you know, the scripts actually do two different things-- the
bugs are both related to negative values though. One causes
PyString_FromStringAndSize() to try an allocate zero bytes (the -24
one), the other causes like 22 bytes to get allocated and then takes
advantage of the sign-conversion when the value is assigned to the zlib
structure member (the member is unsigned, the value is signed)

Honestly, you guys should consider enforcing the safe downcast usage
because signedness issues are all over your code base (as I'm sure you know)

__________________________________
Tracker <report at bugs.python.org>
<http://bugs.python.org/issue2586>
__________________________________


More information about the Python-bugs-list mailing list