diff options
Diffstat (limited to 'src/lib/entropy/egd')
-rw-r--r-- | src/lib/entropy/egd/es_egd.cpp | 6 | ||||
-rw-r--r-- | src/lib/entropy/egd/es_egd.h | 1 |
2 files changed, 4 insertions, 3 deletions
diff --git a/src/lib/entropy/egd/es_egd.cpp b/src/lib/entropy/egd/es_egd.cpp index 1595935d2..728104b44 100644 --- a/src/lib/entropy/egd/es_egd.cpp +++ b/src/lib/entropy/egd/es_egd.cpp @@ -141,15 +141,15 @@ void EGD_EntropySource::poll(Entropy_Accumulator& accum) std::lock_guard<std::mutex> lock(m_mutex); - secure_vector<byte>& io_buffer = accum.get_io_buffer(READ_ATTEMPT); + m_buf.resize(READ_ATTEMPT); for(size_t i = 0; i != sockets.size(); ++i) { - size_t got = sockets[i].read(&io_buffer[0], io_buffer.size()); + size_t got = sockets[i].read(&m_buf[0], m_buf.size()); if(got) { - accum.add(&io_buffer[0], got, 6); + accum.add(&m_buf[0], got, 6); break; } } diff --git a/src/lib/entropy/egd/es_egd.h b/src/lib/entropy/egd/es_egd.h index 3f46bc64f..0c9caec66 100644 --- a/src/lib/entropy/egd/es_egd.h +++ b/src/lib/entropy/egd/es_egd.h @@ -44,6 +44,7 @@ class EGD_EntropySource : public EntropySource std::mutex m_mutex; std::vector<EGD_Socket> sockets; + secure_vector<byte> m_buf; }; } |