[New-bugs-announce] [issue27507] bytearray.extend lacks overflow check when increasing buffer

Xiang Zhang report at bugs.python.org
Wed Jul 13 13:12:28 EDT 2016


New submission from Xiang Zhang:

As the title, bytearray.extend simply use `buf_size = len + (len >> 1) + 1;` to determine next *buf_size* when increasing buffer. But this can overflow in theory. So I suggest adding overflow check.

----------
components: Interpreter Core
files: add_bytearray_extend_overflow_check.patch
keywords: patch
messages: 270327
nosy: serhiy.storchaka, xiang.zhang
priority: normal
severity: normal
status: open
title: bytearray.extend lacks overflow check when increasing buffer
type: enhancement
versions: Python 3.5, Python 3.6
Added file: http://bugs.python.org/file43707/add_bytearray_extend_overflow_check.patch

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue27507>
_______________________________________


More information about the New-bugs-announce mailing list