[issue20023] _csv.Dialect() does not check type for delimiter, escapechar and quotechar fields

STINNER Victor report at bugs.python.org
Thu Dec 19 11:05:52 CET 2013


New submission from STINNER Victor:

Example:

$ ./python -c "import _csv; _csv.Dialect(escapechar=b'x')"
python: Python/ceval.c:4262: call_function: Assertion `(x != ((void *)0) && !PyErr_Occurred()) || (x == ((void *)0) && PyErr_Occurred())' failed.
Abandon (core dumped)

Attached patch should fix this issue and adds a unit test.

Note: I found this issue using Fusil the fuzzer.

----------
files: csv.patch
keywords: patch
messages: 206593
nosy: haypo, serhiy.storchaka
priority: normal
severity: normal
status: open
title: _csv.Dialect() does not check type for delimiter, escapechar and quotechar fields
versions: Python 3.4
Added file: http://bugs.python.org/file33203/csv.patch

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


More information about the Python-bugs-list mailing list