Mercurial > cpython-lru_cache-weakref
diff Objects/object.c @ 36975:bdafca2192d3 legacy-trunk
Fix bug found by Coverity: don't allow NULL argument to PyUnicode_CheckExact
| author | Georg Brandl <georg@python.org> |
|---|---|
| date | Mon, 13 Mar 2006 22:22:11 +0000 |
| parents | 9eb24f92a784 |
| children | 95469e97fd90 |
line wrap: on
line diff
--- a/Objects/object.c Mon Mar 13 22:05:28 2006 +0000 +++ b/Objects/object.c Mon Mar 13 22:22:11 2006 +0000 @@ -402,9 +402,9 @@ 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; }
