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 <rep...@bugs.python.org>
<http://bugs.python.org/issue27507>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to