Commit 9782a2b7 authored by Benjamin Otte's avatar Benjamin Otte

broadway: Use explicit sizes for payload length

The previous greater than comparisons would never trigger the 2nd case.

http://www.viva64.com/en/b/0383/
parent 318a9c46
......@@ -577,14 +577,14 @@ parse_input (BroadwayInput *input)
is_mask = buf[1] & 0x80;
data = buf + 2;
if (payload_len > 125)
if (payload_len == 126)
{
if (len < 4)
return;
payload_len = GUINT16_FROM_BE( *(guint16 *) data );
data += 2;
}
else if (payload_len > 126)
else if (payload_len == 127)
{
if (len < 10)
return;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment