sqlite: copy changeset before applying it · nodejs/node@a77d738 · GitHub
Skip to content

Commit a77d738

Browse files
mcollinaaduh95
authored andcommitted
sqlite: copy changeset before applying it
SQLite can invoke JavaScript conflict and filter callbacks while applying a changeset. Copy the input first so detaching or modifying its backing buffer during a callback does not affect the active operation. Signed-off-by: Matteo Collina <hello@matteocollina.com> PR-URL: #65286 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Edy Silva <edigleyssonsilva@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
1 parent f2a588c commit a77d738

2 files changed

Lines changed: 77 additions & 7 deletions

File tree

‎src/node_sqlite.cc‎

Lines changed: 29 additions & 7 deletions

‎test/parallel/test-sqlite-session.js‎

Lines changed: 48 additions & 0 deletions

0 commit comments

Comments
 (0)