]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
bpo-41815: SQLite: segfault if backup called on closed database (GH-22322)
authorPeter McCormick <peter@pdmccormick.com>
Sun, 20 Sep 2020 03:40:46 +0000 (23:40 -0400)
committerGitHub <noreply@github.com>
Sun, 20 Sep 2020 03:40:46 +0000 (20:40 -0700)
commitbfee9fad84531a471fd7864e88947320669f68e2
tree23627320837bd9104bc215ed274fc07eafce0b44
parentc8c70e78762315643fcd132911bad38842a3e8af
bpo-41815: SQLite: segfault if backup called on closed database (GH-22322)

# [bpo-41815](): SQLite: fix segfault if backup called on closed database

Attempting to backup a closed database will trigger segfault:

```python
import sqlite3
target = sqlite3.connect(':memory:')
source = sqlite3.connect(':memory:')
source.close()
source.backup(target)
```
Lib/sqlite3/test/backup.py
Misc/NEWS.d/next/Library/2020-09-19-23-14-54.bpo-41815.RNpuX3.rst [new file with mode: 0644]
Modules/_sqlite/connection.c