gh-118928: sqlite3: correctly bail if sequences of params are used with named placeholders (#119197)

This commit is contained in:
Erlend E. Aasland 2024-05-20 09:44:42 -04:00 committed by GitHub
parent 0883fd22e6
commit af359cee75
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 3 additions and 0 deletions

View File

@ -0,0 +1,2 @@
Fix an error where incorrect bindings in :mod:`sqlite3` queries could lead
to a crash. Patch by Erlend E. Aasland.

View File

@ -675,6 +675,7 @@ bind_parameters(pysqlite_state *state, pysqlite_Statement *self,
"supplied a sequence which requires nameless (qmark) "
"placeholders.",
i+1, name);
return;
}
if (PyTuple_CheckExact(parameters)) {