diff options
| author | Carl Hetherington <cth@carlh.net> | 2014-06-02 15:35:53 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2014-06-02 15:35:53 +0100 |
| commit | 1850e3c12522298ddb3e66ccf30c6b1207182d5f (patch) | |
| tree | ec14b9f4d9444bc0d187c7e98c6a7cec640c6c19 /asdcplib/src/KM_prng.cpp | |
| parent | bff3ee89298b12f5e3dcb16f13a3e30e542ce87d (diff) | |
Minor trimming of false positives from valgrind.
Diffstat (limited to 'asdcplib/src/KM_prng.cpp')
| -rwxr-xr-x | asdcplib/src/KM_prng.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/asdcplib/src/KM_prng.cpp b/asdcplib/src/KM_prng.cpp index 463ae157..7a0100c1 100755 --- a/asdcplib/src/KM_prng.cpp +++ b/asdcplib/src/KM_prng.cpp @@ -39,7 +39,10 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include <openssl/aes.h> #include <openssl/sha.h> #include <openssl/bn.h> - +#ifdef LIBDCP_VALGRIND +#include <valgrind/memcheck.h> +#endif + using namespace Kumu; @@ -118,6 +121,10 @@ public: SHA1_Update(&SHA, key_fodder, RNG_KEY_SIZE); SHA1_Final(sha_buf, &SHA); +#ifdef LIBDCP_VALGRIND + VALGRIND_MAKE_MEM_DEFINED (sha_buf, 20); +#endif + AutoMutex Lock(m_Lock); AES_set_encrypt_key(sha_buf, RNG_KEY_SIZE_BITS, &m_Context); *(ui32_t*)(m_ctr_buf + 12) = 1; |
