New submission from egreen <egr...@operamail.com>:

The new maketrans static method in Python 3.1 segfaults when using byte
values > 127.

Reproduce: bytes.maketrans(bytes(range(256)), b'X' * 256)

Cause: _Py_bytes_maketrans in Objects/bytes_methods.c uses signed int as
array index.

Fix attached. Also adds test.

----------
components: Interpreter Core
files: maketrans_segfault.patch
keywords: patch
messages: 93599
nosy: egreen
severity: normal
status: open
title: bytes.maketrans segfaults
versions: Python 3.1, Python 3.2
Added file: http://bugs.python.org/file15049/maketrans_segfault.patch

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue7065>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to