diff options
author | 2023-01-12 17:53:58 -0800 | |
---|---|---|
committer | 2023-01-12 17:53:58 -0800 | |
commit | 297732bbb3799c20d86547af42be2bbe8dc3fe15 (patch) | |
tree | 7dfeee50eaad53d2eccce9d517c97306ecb9e467 | |
parent | 90be2543734609bcf917da869c25bf441de5bd7c (diff) | |
download | bun-297732bbb3799c20d86547af42be2bbe8dc3fe15.tar.gz bun-297732bbb3799c20d86547af42be2bbe8dc3fe15.tar.zst bun-297732bbb3799c20d86547af42be2bbe8dc3fe15.zip |
0 initialize remaining indexes in array (#1783)
* 0 initialize remaining indexes in array
* switch to memset
-rw-r--r-- | src/bun.js/bindings/JSBufferList.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/bun.js/bindings/JSBufferList.cpp b/src/bun.js/bindings/JSBufferList.cpp index e54b433e5..0c9815d9e 100644 --- a/src/bun.js/bindings/JSBufferList.cpp +++ b/src/bun.js/bindings/JSBufferList.cpp @@ -75,6 +75,8 @@ JSC::JSValue JSBufferList::concat(JSC::VM& vm, JSC::JSGlobalObject* lexicalGloba i += length; } + memset(uint8Array->typedVector() + i, 0, n - i); + RELEASE_AND_RETURN(throwScope, uint8Array); } |