Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
fixup! fixup! dgram: fix send with out of bounds offset + length
  • Loading branch information
Linkgoron committed Oct 24, 2021
commit c8295526df2ae0e8f900afc68ea0f1116d1fa146
7 changes: 4 additions & 3 deletions test/parallel/test-dgram-send-bad-arguments.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,15 +78,16 @@ function checkArgs(connected) {
}
);

const longArray = [1, 2, 3, 4, 5, 6, 7, 8];
for (const input of ['hello',
Buffer.from('hello'),
Buffer.from('hello world').subarray(0, 5),
Buffer.from('hello world').subarray(4, 9),
Buffer.from('hello world').subarray(6),
new Uint8Array([1, 2, 3, 4, 5]),
new Uint8Array([1, 2, 3, 4, 5, 6, 7, 8]).slice(0, 5),
new Uint8Array([1, 2, 3, 4, 5, 6, 7, 8]).slice(2, 7),
new Uint8Array([1, 2, 3, 4, 5, 6, 7, 8]).slice(3),
new Uint8Array(longArray).subarray(0, 5),
new Uint8Array(longArray).subarray(2, 7),
new Uint8Array(longArray).subarray(3),
new DataView(new ArrayBuffer(5), 0),
new DataView(new ArrayBuffer(6), 1),
new DataView(new ArrayBuffer(7), 1, 5)]) {
Expand Down