Skip to content

Commit

Permalink
test: read proper inspector message size
Browse files Browse the repository at this point in the history
Fix a bug when messages bigger than 64kb where incorrectly parsed by
the inspector-helper.

Fixes: nodejs#14507
  • Loading branch information
bzoz committed Aug 2, 2017
1 parent 98bae29 commit 993636a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion test/inspector/inspector-helper.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ function parseWSFrame(buffer, handler) {
dataLen = buffer.readUInt16BE(2);
bodyOffset = 4;
} else if (dataLen === 127) {
dataLen = buffer.readUInt32BE(2);
dataLen = buffer.readUIntBE(2, 8);
bodyOffset = 10;
}
if (buffer.length < bodyOffset + dataLen)
Expand Down

0 comments on commit 993636a

Please sign in to comment.