]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
bpo-41815: SQLite: segfault if backup called on closed database (GH-22322)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Mon, 21 Sep 2020 22:05:17 +0000 (15:05 -0700)
committerŁukasz Langa <lukasz@langa.pl>
Sun, 4 Oct 2020 16:36:45 +0000 (18:36 +0200)
commitbd55c46895d2fcfadda46701d3c34d78441a7806
treeb92eb02821de3adcffac12f990819637f9dce4a2
parentd6360891b343dd4f7cafbaa3fc2e2164e348c38e
bpo-41815: SQLite: segfault if backup called on closed database (GH-22322)

GH- [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)
```
(cherry picked from commit bfee9fad84531a471fd7864e88947320669f68e2)

Co-authored-by: Peter McCormick <peter@pdmccormick.com>
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