]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
SF patch 514641 (Naofumi Honda) - Negative ob_size of LongObjects
authorGuido van Rossum <guido@python.org>
Fri, 1 Mar 2002 22:24:49 +0000 (22:24 +0000)
committerGuido van Rossum <guido@python.org>
Fri, 1 Mar 2002 22:24:49 +0000 (22:24 +0000)
commit2eb0b87d141ff89582ddd7bb414f9958e39fc6ae
treec80c850e549d64ecd53dc858c3167f6c01aaac87
parent6f33250ef939356b8a577049cafce1961760fd27
SF patch 514641 (Naofumi Honda) - Negative ob_size of LongObjects

Due to the bizarre definition of _PyLong_Copy(), creating an instance
of a subclass of long with a negative value could cause core dumps
later on.  Unfortunately it looks like the behavior of _PyLong_Copy()
is quite intentional, so the fix is more work than feels comfortable.

This fix is almost, but not quite, the code that Naofumi Honda added;
in addition, I added a test case.
Lib/test/test_descr.py
Misc/ACKS
Objects/abstract.c
Objects/object.c