Segfault if pysqlite_Row->description == PyNone
#129603
Labels
extension-modules
C modules in the Modules dir
topic-sqlite3
type-crash
A hard crash of the interpreter, possibly with a core dump
Crash report
What happened?
Most of the code in
Modules/_sqlite/row.c
assumes->description
is a tuple. However, it may beNone
. Since it is possible to craft asqlite3.Row
object "by hand", it is easy to provoke segfauls for paths that involve thePyTuple
API anddescription == Py_None
. Any real code would never directly instantiate a row object; it would be implicitly created by the cursor (via the.fetch*()
APIs or by iterating on the cursor). However, I don't think we should let a possible segfault hang around.CPython versions tested on:
3.14, 3.13, 3.12, CPython main branch
Operating systems tested on:
macOS
Output from running 'python -VV' on the command line:
No response
Linked PRs
The text was updated successfully, but these errors were encountered: