mirror of
https://github.com/warmcat/libwebsockets.git
synced 2025-03-09 00:00:04 +01:00
fix failure to limit 7bit lengths
Reported-by: Tran Le Hung <tranhung44@gmail.com> Reported-by: Tobias Maier <tobias.maier@netplace.com> Signed-off-by: Andy Green <andy@warmcat.com>
This commit is contained in:
parent
f24311527e
commit
5bf65788ea
1 changed files with 2 additions and 2 deletions
|
@ -495,7 +495,7 @@ handle_first:
|
|||
|
||||
wsi->this_frame_masked = !!(c & 0x80);
|
||||
|
||||
switch (c) {
|
||||
switch (c & 0x7f) {
|
||||
case 126:
|
||||
/* control frames are not allowed to have big lengths */
|
||||
if (wsi->opcode & 8)
|
||||
|
@ -959,7 +959,7 @@ int libwebsocket_client_rx_sm(struct libwebsocket *wsi, unsigned char c)
|
|||
|
||||
wsi->this_frame_masked = !!(c & 0x80);
|
||||
|
||||
switch (c) {
|
||||
switch (c & 0x7f) {
|
||||
case 126:
|
||||
/* control frames are not allowed to have big lengths */
|
||||
if (wsi->opcode & 8)
|
||||
|
|
Loading…
Add table
Reference in a new issue