Add comprehensive bounds checking to WebSocket message parsing in wsssht.c
- Prevent heap corruption from malformed JSON messages - Add bounds validation for all string operations in message parsing - Ensure all pointers stay within payload buffer limits - Validate data field lengths to prevent excessive memory allocation - Protect against buffer overflows in tunnel_data, tunnel_close, tunnel_keepalive, tunnel_ack, and tunnel_ko message parsing - Add debug logging for malformed messages to aid troubleshooting
Showing
This diff is collapsed.
Please
register
or
sign in
to comment