mirror of
https://github.com/zeromq/libzmq.git
synced 2025-01-06 00:31:13 +01:00
Merge pull request #4013 from bluca/fuzzers
Problem: ws_engine leaks memory if Sec-WebSocket-Protocol header pass…
This commit is contained in:
commit
29f5ede684
@ -865,6 +865,10 @@ bool zmq::ws_engine_t::client_handshake ()
|
|||||||
strcpy_s (_websocket_accept, _header_value);
|
strcpy_s (_websocket_accept, _header_value);
|
||||||
else if (strcasecmp ("Sec-WebSocket-Protocol", _header_name)
|
else if (strcasecmp ("Sec-WebSocket-Protocol", _header_name)
|
||||||
== 0) {
|
== 0) {
|
||||||
|
if (_mechanism) {
|
||||||
|
_client_handshake_state = client_handshake_error;
|
||||||
|
break;
|
||||||
|
}
|
||||||
if (select_protocol (_header_value))
|
if (select_protocol (_header_value))
|
||||||
strcpy_s (_websocket_protocol, _header_value);
|
strcpy_s (_websocket_protocol, _header_value);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user