New submission from Lorenz Quack <d...@amberfisharts.com>:

The C-API function "PyUnicode_AsUnicode(PyObject *unicode)" does not check the 
argument for NULL pointers. 
It passes it directly to the macro "PyUnicode_Check(op)" which then crashes 
when trying to access "Py_TYPE(op)".

I marked this as Python 2.7 because I checked this on trunk but I assume that 
this bug is present in all versions.

The attached patch fixes this issue.

----------
files: PyUnicode_AsUnicode.patch
keywords: patch
messages: 100809
nosy: donlorenzo
severity: normal
status: open
title: PyUnicode_AsUnicode doesn't check for NULL pointer
versions: Python 2.7
Added file: http://bugs.python.org/file16520/PyUnicode_AsUnicode.patch

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

Reply via email to