check max frame size (#119)
This commit is contained in:
parent
ebb31b4e87
commit
c943e72c7b
@ -542,6 +542,13 @@ namespace ix
|
||||
ws.masking_key[3] = 0;
|
||||
}
|
||||
|
||||
// Prevent integer overflow in the next conditional
|
||||
const uint64_t maxFrameSize(1 << 63);
|
||||
if (ws.N > maxFrameSize)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (_rxbuf.size() < ws.header_size + ws.N)
|
||||
{
|
||||
return; /* Need: ws.header_size+ws.N - _rxbuf.size() */
|
||||
|
Loading…
Reference in New Issue
Block a user