0
0
mirror of https://github.com/zeromq/libzmq.git synced 2024-12-27 15:41:05 +08:00

Merge pull request #103 from bluca/uninitialised_sockopt

Problem: curve keys getsockopt uninitialised read
This commit is contained in:
Pieter Hintjens 2016-02-16 14:51:29 +01:00
commit 4d45ee9440
2 changed files with 4 additions and 1 deletions

View File

@ -21,7 +21,7 @@ env:
before_script:
- mkdir tmp
# libsodium
- git clone git://github.com/jedisct1/libsodium.git
- git clone --depth 1 -b stable git://github.com/jedisct1/libsodium.git
- ( cd libsodium; ./autogen.sh; ./configure --prefix=${BUILD_PREFIX}; make check; make install )
# ZMQ stress tests need more open socket (files) than the usual default

View File

@ -68,6 +68,9 @@ zmq::options_t::options_t () :
conflate (false),
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_,