]> granicus.if.org Git - python/commit
Issue #25678: Copy buffer objects to null-terminated strings.
authorSerhiy Storchaka <storchaka@gmail.com>
Fri, 20 Nov 2015 19:56:21 +0000 (21:56 +0200)
committerSerhiy Storchaka <storchaka@gmail.com>
Fri, 20 Nov 2015 19:56:21 +0000 (21:56 +0200)
commit6156560e4b40ae81304d80b5a932fd90e6b4ba80
treed8ed8e08a60b0c9ed7f3cb582d5765fa1f814643
parent815ab140302a2f7a541d1bbda650875bd47f8ea2
Issue #25678: Copy buffer objects to null-terminated strings.

Avoid buffer overreads when int(), long(), float(), and compile()
are passed buffer objects.  Similar code is removed from the
complex() constructor, where it was not reachable.

Patch backported from issue #24802 by Eryk Sun.
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