mirror of
https://github.com/nodejs/node.git
synced 2026-11-24 21:50:36 -05:00
sqlite: prevent reentrant session.close()
Reject session.close() while generating a changeset or patchset. Closing the session at that point frees it while SQLite is still using it, causing a use-after-free. Signed-off-by: Kamat, Trivikram <16024985+trivikr@users.noreply.github.com> Assisted-by: codex:gpt-5.6-sol PR-URL: https://github.com/nodejs/node/pull/65349 Fixes: https://github.com/nodejs/node/issues/65347 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
This commit is contained in:
1 parent
882a781cfb
commit
d6bbf5799f
4 files changed
+31
-1
No files matched your search
@@ -458,6 +458,7 @@ class Session : public BaseObject {
|
||||
void Delete();
|
||||
sqlite3_session* session_;
|
||||
BaseObjectPtr<DatabaseSync> database_; // The Parent Database
|
||||
bool is_generating_changeset_ = false;
|
||||
|
||||
friend class DatabaseSync;
|
||||
};
|
||||
|
||||
Reference in new issue
Block a user