Skip to content

Commit af359ce

Browse files
gh-118928: sqlite3: correctly bail if sequences of params are used with named placeholders (#119197)
1 parent 0883fd2 commit af359ce

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Fix an error where incorrect bindings in :mod:`sqlite3` queries could lead
2+
to a crash. Patch by Erlend E. Aasland.

Modules/_sqlite/cursor.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -675,6 +675,7 @@ bind_parameters(pysqlite_state *state, pysqlite_Statement *self,
675675
"supplied a sequence which requires nameless (qmark) "
676676
"placeholders.",
677677
i+1, name);
678+
return;
678679
}
679680

680681
if (PyTuple_CheckExact(parameters)) {

0 commit comments

Comments
 (0)