ffi: validate DynamicLibrary getter receivers · nodejs/node@bdcb6de · GitHub
Skip to content

Commit bdcb6de

Browse files
trivikraduh95
authored andcommitted
ffi: validate DynamicLibrary getter receivers
Bind the path, symbols, and functions getter templates to the DynamicLibrary constructor signature. This causes V8 to reject incompatible receivers before invoking the native callbacks, preventing them from crashing the process. Signed-off-by: Kamat, Trivikram <16024985+trivikr@users.noreply.github.com> Assisted-by: codex:gpt-5.6-sol PR-URL: #65415 Fixes: #65287 Reviewed-By: Paolo Insogna <paolo@cowtech.it>
1 parent 0ec15a2 commit bdcb6de

2 files changed

Lines changed: 26 additions & 3 deletions

File tree

‎src/node_ffi.cc‎

Lines changed: 8 additions & 3 deletions

‎test/ffi/test-ffi-dynamic-library.js‎

Lines changed: 18 additions & 0 deletions

0 commit comments

Comments
 (0)