We only supported those specific control packet payloads up to 124.
125 is the correct limit.
Lws was consistent about the wrong limit so there are no other
issues. It doesn't affect user ABI correcting it either.
Signed-off-by: Andy Green <andy.green@linaro.org>
}
/* control packets can only be < 128 bytes long */
- if (wsi->u.ws.rx_user_buffer_head > 128 - 4) {
+ if (wsi->u.ws.rx_user_buffer_head > 128 - 3) {
lwsl_parser("DROP PING payload too large\n");
goto ping_drop;
}
}
process_as_ping:
/* control packets can only be < 128 bytes long */
- if (wsi->u.ws.rx_user_buffer_head > 128 - 4) {
+ if (wsi->u.ws.rx_user_buffer_head > 128 - 3) {
lwsl_parser("DROP PING payload too large\n");
goto ping_drop;
}
unsigned int rx_user_buffer_head;
unsigned char mask_nonce[4];
/* Also used for close content... control opcode == < 128 */
- unsigned char ping_payload_buf[128 - 4 + LWS_SEND_BUFFER_PRE_PADDING];
+ unsigned char ping_payload_buf[128 - 3 + LWS_SEND_BUFFER_PRE_PADDING];
unsigned char ping_payload_len;
unsigned char frame_mask_index;