On 9/12/2012 10:22 AM, Stefan Krah wrote:
christian.heimes <python-check...@python.org> wrote:
Fix out of bounds read in long_new() for empty bytes with an explicit base.
>> int(b'', somebase) calls PyLong_FromString() with char* of length 1
I don't know what happens internally, but such calls raise
ValueError: invalid literal for int() with base 16: ''
Of course, even if int() traps such calls before calling
PyLong_FromString, an extension writer could goof.
Does the length 1 come from added \0?
By the way, excessively long lines in checkin messages are a nuisance
from reading and responding ;-).
--
Terry Jan Reedy
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com