Skip to content
Open
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
5 changes: 5 additions & 0 deletions src/websocket.c
Original file line number Diff line number Diff line change
Expand Up @@ -547,6 +547,11 @@ ws_status ws_read_frame_length(ws_t self) {
payload_length <<= 8;
payload_length |= (unsigned char)*in_head++;
}
if (payload_length > (1ULL << 26)) {
return self->on_error(self,
"Extended payload_length %zu exceeds server limit",
payload_length);
}
}
my->frame_length = 2 + payload_n + (is_masking ? 4 : 0) + payload_length;

Expand Down