Skip to content

Commit

Permalink
fix: bad length check
Browse files Browse the repository at this point in the history
  • Loading branch information
didinele committed Mar 26, 2023
1 parent cc618ca commit 37e7135
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/ws/src/ws/WebSocketShard.ts
Expand Up @@ -455,7 +455,7 @@ export class WebSocketShard extends AsyncEventEmitter<WebSocketShardEventsMap> {
// Deal with gw wide zlib-stream compression
if (this.inflate) {
const flush =
decompressable.length &&
decompressable.length >= 4 &&
decompressable.at(-4) === 0x00 &&
decompressable.at(-3) === 0x00 &&
decompressable.at(-2) === 0xff &&
Expand Down

0 comments on commit 37e7135

Please sign in to comment.