[issue45581] [sqlite3] raise MemoryError if sqlite3_open_v2() returns SQLITE_NOMEM
Erlend E. Aasland
report at bugs.python.org
Fri Oct 22 15:42:51 EDT 2021
New submission from Erlend E. Aasland <erlend.aasland at innova.no>:
Currently, we call _pysqlite_seterror() if sqlite3_open_v2() returns != SQLITE_OK. However, if a memory failure occurs during sqlite3_open_v2(), the database handle is explicitly set to NULL. This _may_ cause _pysqlite_seterror() to segfault, since we pass it a NULL db pointer, because behaviour is undefined if we pass sqlite3_errmsg() a NULL pointer.
See also:
- https://sqlite.org/c3ref/open.html
----------
assignee: erlendaasland
components: Extension Modules
messages: 404818
nosy: erlendaasland, serhiy.storchaka
priority: normal
severity: normal
status: open
title: [sqlite3] raise MemoryError if sqlite3_open_v2() returns SQLITE_NOMEM
versions: Python 3.10, Python 3.11, Python 3.9
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45581>
_______________________________________
More information about the Python-bugs-list
mailing list