New submission from Amaury Forgeot d'Arc <[email protected]>:
This crashes on python 3.3::
class S(ctypes.Structure):
_fields_ = [(b'x', ctypes.c_int)]
This also crashes on python 2.7::
class S(ctypes.Structure):
_fields_ = [(u'x\xe9', ctypes.c_int)]
The cause is the same: in Modules/_ctypes/stgdict.c, the assignment
fieldname = _PyUnicode_AsString(name);
does not check for errors.
----------
components: ctypes
keywords: easy
messages: 142218
nosy: amaury.forgeotdarc
priority: normal
severity: normal
status: open
title: segfault in ctypes.Struct with bad _fields_
type: crash
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue12764>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com