[New-bugs-announce] [issue3967] bytearray().count()

STINNER Victor report at bugs.python.org
Thu Sep 25 23:39:33 CEST 2008


New submission from STINNER Victor <victor.stinner at haypocalc.com>:

bytes_count() doesn't check start maximum value: _adjust_indices()
should check that start is smaller than len (smaller or egal? len or
len-1?). Example:

>>> b = bytearray(3)
>>> b.count("x", 1491491034, 0)

start=1491491034 should be replaced by 3 (or 2 or 4? I don't know
bytearray enough).

----------
components: Interpreter Core
messages: 73817
nosy: haypo
severity: normal
status: open
title: bytearray().count()
type: crash
versions: Python 2.6

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


More information about the New-bugs-announce mailing list