Issue #6697: Check that _PyUnicode_AsString() result is not NULL in _sqlite

Strip also some trailing spaces
This commit is contained in:
Victor Stinner 2010-05-19 01:27:23 +00:00
parent f6c578328c
commit 8699950b04
4 changed files with 13 additions and 6 deletions

View file

@ -83,6 +83,8 @@ PyObject* pysqlite_row_subscript(pysqlite_Row* self, PyObject* idx)
return item;
} else if (PyUnicode_Check(idx)) {
key = _PyUnicode_AsString(idx);
if (key == NULL)
return NULL;
nitems = PyTuple_Size(self->description);