New submission from STINNER Victor <victor.stin...@haypocalc.com>:

$ ./python 
Python 3.2rc1+ (unknown, Jan 18 2011, 00:55:20) 
>>> import _string
>>> _string.formatter_field_name_split(1)
python: Objects/stringlib/string_format.h:1347: formatter_field_name_split: 
Assertion `((((((PyObject*)(self))->ob_type))->tp_flags & ((1L<<28))) != 0)' 
failed.
Abandon

$ ./python 
Python 3.2rc1+ (unknown, Jan 18 2011, 00:55:20) 
>>> import _string
>>> _string.formatter_parser(1)
python: Objects/stringlib/string_format.h:1206: formatter_parser: Assertion 
`((((((PyObject*)(self))->ob_type))->tp_flags & ((1L<<28))) != 0)' failed.
Abandon

Attached patch fixes both crashes and add tests on the _string module (which 
has only these two functions).

----------
components: Library (Lib)
files: _string.patch
keywords: patch
messages: 127236
nosy: haypo
priority: normal
severity: normal
status: open
title: _string: formatter_field_name_split() and formatter_parser doesn't check 
input type
versions: Python 3.1, Python 3.2, Python 3.3
Added file: http://bugs.python.org/file20562/_string.patch

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

Reply via email to