Kaydet (Commit) 3daf7587 authored tarafından Georg Brandl's avatar Georg Brandl

Fix bug found by Coverity: don't allow NULL argument to PyUnicode_CheckExact

üst d364a075
......@@ -402,9 +402,9 @@ PyObject_Unicode(PyObject *v)
PyObject *func;
static PyObject *unicodestr;
if (v == NULL)
if (v == NULL) {
res = PyString_FromString("<NULL>");
if (PyUnicode_CheckExact(v)) {
} else if (PyUnicode_CheckExact(v)) {
Py_INCREF(v);
return v;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment