commit | 3daf75878df471bafb3c454c8f216fe7cbcb80ee | [log] [tgz] |
---|---|---|
author | Georg Brandl <georg@python.org> | Mon Mar 13 22:22:11 2006 +0000 |
committer | Georg Brandl <georg@python.org> | Mon Mar 13 22:22:11 2006 +0000 |
tree | 350b43892cfe81c2ef37b7b4e782546170b0227c | |
parent | d364a07517bb2a413e5d4739c2f43c4af218be43 [diff] |
Fix bug found by Coverity: don't allow NULL argument to PyUnicode_CheckExact
diff --git a/Objects/object.c b/Objects/object.c index 866ce06..c4634f7 100644 --- a/Objects/object.c +++ b/Objects/object.c
@@ -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; }