[New-bugs-announce] [issue31764] sqlite3.Cursor.close() crashes in case the Cursor object is uninitialized
Oren Milman
report at bugs.python.org
Wed Oct 11 15:09:18 EDT 2017
New submission from Oren Milman <orenmn at gmail.com>:
The following code causes a crash:
import sqlite3
cursor = sqlite3.Cursor.__new__(sqlite3.Cursor)
cursor.close()
this is because pysqlite_cursor_close() (in Modules/_sqlite/cursor.c) assumes
that `self->connection` is not NULL, and passes it to pysqlite_check_thread(),
which crashes.
I would open a PR to fix this soon.
----------
components: Extension Modules
messages: 304172
nosy: Oren Milman
priority: normal
severity: normal
status: open
title: sqlite3.Cursor.close() crashes in case the Cursor object is uninitialized
type: crash
versions: Python 3.7
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue31764>
_______________________________________
More information about the New-bugs-announce
mailing list