mirror of
https://github.com/zeromq/libzmq.git
synced 2025-01-14 09:47:56 +08:00
Problem: curve keys getsockopt uninitialised read
Solution: always initialised zmq::options_t class variables arrays to avoid reading uninitialised data when CURVE is not yet configured and a getsockopt ZMQ_CURVE_{SERVER | PUBLIC | SECRET]KEY is issued. Backport from libzmq.
This commit is contained in:
parent
1b95e5fead
commit
6e1424349b
@ -55,6 +55,9 @@ zmq::options_t::options_t () :
|
||||
socket_id (0),
|
||||
conflate (false)
|
||||
{
|
||||
memset (curve_public_key, 0, CURVE_KEYSIZE);
|
||||
memset (curve_secret_key, 0, CURVE_KEYSIZE);
|
||||
memset (curve_server_key, 0, CURVE_KEYSIZE);
|
||||
}
|
||||
|
||||
int zmq::options_t::setsockopt (int option_, const void *optval_,
|
||||
|
Loading…
x
Reference in New Issue
Block a user