Skip to content

Commit

Permalink
fix: out of bounds copy
Browse files Browse the repository at this point in the history
  • Loading branch information
ronag committed Oct 4, 2024
1 parent d2ad9b4 commit 500e5e4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/v8.js
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,7 @@ class DefaultDeserializer extends Deserializer {
}
// Copy to an aligned buffer first.
const buffer_copy = Buffer.allocUnsafe(byteLength);
copy(this.buffer, buffer_copy, 0, byteOffset, byteOffset + byteLength);
copy(this.buffer, buffer_copy, 0, byteOffset, byteLength);
return new ctor(buffer_copy.buffer,
buffer_copy.byteOffset,
byteLength / BYTES_PER_ELEMENT);
Expand Down

0 comments on commit 500e5e4

Please sign in to comment.