Skip to content

Commit

Permalink
Merge pull request #103 from bluca/uninitialised_sockopt
Browse files Browse the repository at this point in the history
Problem: curve keys getsockopt uninitialised read
  • Loading branch information
hintjens committed Feb 16, 2016
2 parents cb811a1 + eda5426 commit 4d45ee9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 3 additions & 0 deletions src/options.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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_,
Expand Down

0 comments on commit 4d45ee9

Please sign in to comment.