[New-bugs-announce] [issue7080] locale.strxfrm raises MemoryError
egreen
report at bugs.python.org
Thu Oct 8 01:01:43 CEST 2009
New submission from egreen <egreen at operamail.com>:
The strxfrm function in the locale module can potentially raise a
MemoryError.
The failing malloc is in Modules/_localemodule.c, line 291.
This is because the variable n0 of type Py_ssize_t is passed to
PyArg_ParseTuple, which expects an int when PY_SSIZE_T_CLEAN is not defined.
Patch attached, which also fixes an unrelated memory leak.
----------
components: Library (Lib)
files: strxfrm_MemoryError.patch
keywords: patch
messages: 93728
nosy: egreen, loewis
severity: normal
status: open
title: locale.strxfrm raises MemoryError
type: crash
versions: Python 3.1, Python 3.2
Added file: http://bugs.python.org/file15078/strxfrm_MemoryError.patch
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue7080>
_______________________________________
More information about the New-bugs-announce
mailing list