sqlite: fix undefined behaviour in `Session::Changeset()` · nodejs/node@09d0da9 · GitHub
Skip to content

Commit 09d0da9

Browse files
ndosscheaduh95
authored andcommitted
sqlite: fix undefined behaviour in Session::Changeset()
If `nChangeset == 0`, the pointer `pChangeset` may be nullptr. Passing a nullptr to `memcpy()` is undefined behaviour. This can be triggered by running the test suite under UBSAN. Signed-off-by: ndossche <nora.dossche@ugent.be> PR-URL: #63637 Reviewed-By: René <contact.9a5d6388@renegade334.me.uk>
1 parent 58ea88e commit 09d0da9

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

src/node_sqlite.cc

Lines changed: 3 additions & 1 deletion

0 commit comments

Comments
 (0)