diff options
| author | Michael Vornovitsky <michaelvornovitskiy@outlook.com> | 2023-11-11 20:10:51 -0500 |
|---|---|---|
| committer | Damien George <damien@micropython.org> | 2024-07-22 10:42:29 +1000 |
| commit | 6db91dfefb1a7ba0026106d8f0c6589630e9a012 (patch) | |
| tree | dbbf7ce6a292feb26ab17404715019baa68e8a94 /py/objnone.c | |
| parent | 8159dcc276dc07bcb28d6ab3a3b7d2a5c1d90ab5 (diff) | |
extmod/modbtree: Add checks for already-closed database.
Fixes use-after-free when accessing the database after it is closed with
`btree_close`. `btree_close` always succeeds when called with an
already-closed database.
The new test checks that operations that access the underlying database
(get, set, flush, seq) fail with a `ValueError` when the btree is already
closed. It also checks that closing and printing the btree succeed when
the btree is already closed.
Fixes issue #12543.
Signed-off-by: Michael Vornovitsky <michaelvornovitskiy@outlook.com>
Diffstat (limited to 'py/objnone.c')
0 files changed, 0 insertions, 0 deletions
