Skip to content
Merged
Changes from all commits
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
7 changes: 7 additions & 0 deletions packages/node/src/anr/websocket.ts
Original file line number Diff line number Diff line change
Expand Up @@ -296,6 +296,13 @@ class WebSocketInterface extends EventEmitter {
return;
}

// There needs to be atleast two values in the buffer for us to parse
// a frame from it.
// See: https://github.com/getsentry/sentry-javascript/issues/9307
if (buff.length <= 1) {
return;
}

const frame = parseFrame(buff);

if (isCompleteFrame(frame)) {
Expand Down