Commit b828c4ab41f6357eb7c401518a3c531f0b1612f4

Calin Culianu 2023-10-16T15:25:12

Added 10MiB recv limit for WS frames, also a small nit - Added WS_MAX_RECV_FRAME_SZ, if a received frame exceeds this limit (10 MiB), error out. This is a DoS prevention measure. - Also redid the unmasking code in get_ws_frame(), to avoid assumptions about the size of an unsigned int and some casting, and avoid memcpy(), just use the mask bytes from the buffer that are already there to unmask.