Compare commits

...

1 Commits

Author SHA1 Message Date
499262f752 check max frame size 2019-10-26 11:48:03 -07:00

View File

@ -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() */