diff options
author | Victor Stinner <victor.stinner@haypocalc.com> | 2010-05-19 01:27:23 (GMT) |
---|---|---|
committer | Victor Stinner <victor.stinner@haypocalc.com> | 2010-05-19 01:27:23 (GMT) |
commit | 8699950b04343afe37e9dcdce87028ba0f56827b (patch) | |
tree | eae09cfadd1474a6cdb5a5b23f8d0bf03ae239c2 /Modules/_sqlite/row.c | |
parent | f6c578328c419f25dea91425479a6ceeb891b04d (diff) | |
download | cpython-8699950b04343afe37e9dcdce87028ba0f56827b.zip cpython-8699950b04343afe37e9dcdce87028ba0f56827b.tar.gz cpython-8699950b04343afe37e9dcdce87028ba0f56827b.tar.bz2 |
Issue #6697: Check that _PyUnicode_AsString() result is not NULL in _sqlite
Strip also some trailing spaces
Diffstat (limited to 'Modules/_sqlite/row.c')
-rw-r--r-- | Modules/_sqlite/row.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Modules/_sqlite/row.c b/Modules/_sqlite/row.c index 0aa78f4..54a89e1 100644 --- a/Modules/_sqlite/row.c +++ b/Modules/_sqlite/row.c @@ -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); |