SIGN IN SIGN UP
python / cpython UNCLAIMED

The Python programming language

0 0 136 Python

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.
G
Guido van Rossum committed
2eb0b87d141ff89582ddd7bb414f9958e39fc6ae
Parent: 6f33250