]> granicus.if.org Git - python/commit
Issue #24802: Copy bytes-like objects to null-terminated buffers if necessary
authorMartin Panter <vadmium+py@gmail.com>
Sat, 7 Nov 2015 02:32:21 +0000 (02:32 +0000)
committerMartin Panter <vadmium+py@gmail.com>
Sat, 7 Nov 2015 02:32:21 +0000 (02:32 +0000)
commiteeb896c4116dd763efea45cb3c1b53257128f4e4
tree34e8df45212ee5c99849dfca30977b92901615d6
parent9ad0aae6566311c6982a20955381cda5a2954519
Issue #24802: Copy bytes-like objects to null-terminated buffers if necessary

This avoids possible buffer overreads when int(), float(), compile(), exec()
and eval() are passed bytes-like objects. Similar code is removed from the
complex() constructor, where it was not reachable.

Patch by John Leitch, Serhiy Storchaka and Martin Panter.
Lib/test/test_compile.py
Lib/test/test_float.py
Lib/test/test_int.py
Misc/NEWS
Objects/abstract.c
Objects/complexobject.c
Objects/floatobject.c
Python/bltinmodule.c