[New-bugs-announce] [issue8113] PyUnicode_AsUnicode doesn't check for NULL pointer

Lorenz Quack report at bugs.python.org
Wed Mar 10 23:30:29 CET 2010


New submission from Lorenz Quack <don at 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 <report at bugs.python.org>
<http://bugs.python.org/issue8113>
_______________________________________


More information about the New-bugs-announce mailing list