mirror of
https://github.com/warmcat/libwebsockets.git
synced 2025-03-09 00:00:04 +01:00
fix dropmask dereference even when NULL
Signed-off-by: Nikolay Dimitrov <ndimitrov@setelis.com>
This commit is contained in:
parent
0a0a7ebc37
commit
a8268e7619
1 changed files with 4 additions and 3 deletions
|
@ -555,14 +555,15 @@ do_more_inside_frame:
|
|||
/*
|
||||
* in v7, just mask the payload
|
||||
*/
|
||||
for (n = 4; n < (int)len + 4; n++)
|
||||
dropmask[n] = dropmask[n] ^
|
||||
if (dropmask) { /* never set if already inside frame */
|
||||
for (n = 4; n < (int)len + 4; n++)
|
||||
dropmask[n] = dropmask[n] ^
|
||||
wsi->u.ws.frame_masking_nonce_04[
|
||||
(wsi->u.ws.frame_mask_index++) & 3];
|
||||
|
||||
if (dropmask) /* never set if already inside frame */
|
||||
/* copy the frame nonce into place */
|
||||
memcpy(dropmask, wsi->u.ws.frame_masking_nonce_04, 4);
|
||||
}
|
||||
}
|
||||
|
||||
send_raw:
|
||||
|
|
Loading…
Add table
Reference in a new issue