[Python-checkins] cpython: Issue #19437: Fix pysqlite_cursor_iternext() of sqlite3, handle
victor.stinner
python-checkins at python.org
Tue Nov 5 18:07:59 CET 2013
http://hg.python.org/cpython/rev/b93614f7ed83
changeset: 86944:b93614f7ed83
parent: 86941:0aa2aedc6a21
user: Victor Stinner <victor.stinner at gmail.com>
date: Tue Nov 05 14:30:11 2013 +0100
summary:
Issue #19437: Fix pysqlite_cursor_iternext() of sqlite3, handle
_pysqlite_fetch_one_row() failure
files:
Modules/_sqlite/cursor.c | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/Modules/_sqlite/cursor.c b/Modules/_sqlite/cursor.c
--- a/Modules/_sqlite/cursor.c
+++ b/Modules/_sqlite/cursor.c
@@ -891,6 +891,12 @@
if (rc == SQLITE_ROW) {
self->next_row = _pysqlite_fetch_one_row(self);
+ if (self->next_row == NULL) {
+ (void)pysqlite_statement_reset(self->statement);
+ Py_DECREF(next_row);
+ _pysqlite_seterror(self->connection->db, NULL);
+ return NULL;
+ }
}
}
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list