From 971f09abe486185247e1faf4e8d1419ba2506b8d Mon Sep 17 00:00:00 2001 From: Luca Casonato Date: Thu, 23 May 2024 00:03:35 +0200 Subject: fix(runtime): use more null proto objects (#23921) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This is a primordialization effort to improve resistance against users tampering with the global `Object` prototype. --------- Co-authored-by: Bartek IwaƄczuk --- ext/ffi/00_ffi.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ext/ffi') diff --git a/ext/ffi/00_ffi.js b/ext/ffi/00_ffi.js index a572ed61c..19d62dfdd 100644 --- a/ext/ffi/00_ffi.js +++ b/ext/ffi/00_ffi.js @@ -475,7 +475,7 @@ const UnsafeCallbackPrototype = UnsafeCallback.prototype; class DynamicLibrary { #rid; - symbols = {}; + symbols = { __proto__: null }; constructor(path, symbols) { ({ 0: this.#rid, 1: this.symbols } = op_ffi_load({ path, symbols })); -- cgit v1.2.3