mirror of
https://github.com/zeromq/libzmq.git
synced 2025-03-17 16:43:58 +00: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
cb811a1e0c
commit
6a66c05179
@ -68,6 +68,9 @@ zmq::options_t::options_t () :
|
|||||||
conflate (false),
|
conflate (false),
|
||||||
handshake_ivl (30000)
|
handshake_ivl (30000)
|
||||||
{
|
{
|
||||||
|
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_,
|
int zmq::options_t::setsockopt (int option_, const void *optval_,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user