Skip to content

Commit

Permalink
Merge pull request zeromq#1805 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 93f99d0 + f867953 commit df6876a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/options.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,9 @@ zmq::options_t::options_t () :
heartbeat_timeout (-1),
use_fd (-1)
{
memset (curve_public_key, 0, CURVE_KEYSIZE);
memset (curve_secret_key, 0, CURVE_KEYSIZE);
memset (curve_server_key, 0, CURVE_KEYSIZE);
#if defined ZMQ_HAVE_VMCI
vmci_buffer_size = 0;
vmci_buffer_min_size = 0;
Expand Down

0 comments on commit df6876a

Please sign in to comment.