Skip to content

Commit 1c5fafd

Browse files
committed
Fix Uint8Array concat crash in Parse IPv4 header
1 parent 37a9246 commit 1c5fafd

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/core/operations/ParseIPv4Header.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ class ParseIPv4Header extends Operation {
7474
checksum = input[10] << 8 | input[11],
7575
srcIP = input[12] << 24 | input[13] << 16 | input[14] << 8 | input[15],
7676
dstIP = input[16] << 24 | input[17] << 16 | input[18] << 8 | input[19],
77-
checksumHeader = input.slice(0, 10).concat([0, 0]).concat(input.slice(12, 20));
77+
checksumHeader = [...input.slice(0, 10), 0, 0, ...input.slice(12, 20)];
7878
let version = (input[0] >>> 4) & 0x0f,
7979
options = [];
8080

0 commit comments

Comments
 (0)