mirror of
https://github.com/python/cpython.git
synced 2025-12-23 09:19:18 +00:00
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
|
||
|---|---|---|
| .. | ||
| cache.c | ||
| cache.h | ||
| connection.c | ||
| connection.h | ||
| cursor.c | ||
| cursor.h | ||
| microprotocols.c | ||
| microprotocols.h | ||
| module.c | ||
| module.h | ||
| prepare_protocol.c | ||
| prepare_protocol.h | ||
| row.c | ||
| row.h | ||
| statement.c | ||
| statement.h | ||
| util.c | ||
| util.h | ||