aboutsummaryrefslogtreecommitdiffstats
path: root/lib/crypto/c_src/crypto.c
diff options
context:
space:
mode:
authorSverker Eriksson <[email protected]>2017-07-20 17:48:37 +0200
committerSverker Eriksson <[email protected]>2017-07-20 17:48:37 +0200
commit00a9b77b6cbb4a7159ebdf94181dbac272592192 (patch)
tree16fbc2429e32f4bed3b6cd79aa44472b34079931 /lib/crypto/c_src/crypto.c
parentbaa2a2a292f9b66c343a7d5ac1835b3af2e5bb3d (diff)
parent077e96db54a1538f7d8dd1271cc216783493badf (diff)
downloadotp-00a9b77b6cbb4a7159ebdf94181dbac272592192.tar.gz
otp-00a9b77b6cbb4a7159ebdf94181dbac272592192.tar.bz2
otp-00a9b77b6cbb4a7159ebdf94181dbac272592192.zip
Merge branch 'sverker/crypto/valgrind-compile-errors' into maint
* sverker/crypto/valgrind-compile-errors: crypto: Fix compile errors for make target 'valgrind'
Diffstat (limited to 'lib/crypto/c_src/crypto.c')
-rw-r--r--lib/crypto/c_src/crypto.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/crypto/c_src/crypto.c b/lib/crypto/c_src/crypto.c
index 52ce00b937..1d9c1e0f88 100644
--- a/lib/crypto/c_src/crypto.c
+++ b/lib/crypto/c_src/crypto.c
@@ -4048,14 +4048,14 @@ printf("\r\n");
RSA *rsa = EVP_PKEY_get1_RSA(pkey);
enif_alloc_binary(RSA_size(rsa), &sig_bin);
len = EVP_MD_size(md);
- ERL_VALGRIND_ASSERT_MEM_DEFINED(digest_bin.data, len);
+ ERL_VALGRIND_ASSERT_MEM_DEFINED(tbs, len);
i = RSA_sign(md->type, tbs, len, sig_bin.data, &siglen, rsa);
RSA_free(rsa);
} else if (argv[0] == atom_dss) {
DSA *dsa = EVP_PKEY_get1_DSA(pkey);
enif_alloc_binary(DSA_size(dsa), &sig_bin);
len = EVP_MD_size(md);
- ERL_VALGRIND_ASSERT_MEM_DEFINED(digest_bin.data, len);
+ ERL_VALGRIND_ASSERT_MEM_DEFINED(tbs, len);
i = DSA_sign(md->type, tbs, len, sig_bin.data, &siglen, dsa);
DSA_free(dsa);
} else if (argv[0] == atom_ecdsa) {
@@ -4063,7 +4063,7 @@ printf("\r\n");
EC_KEY *ec = EVP_PKEY_get1_EC_KEY(pkey);
enif_alloc_binary(ECDSA_size(ec), &sig_bin);
len = EVP_MD_size(md);
- ERL_VALGRIND_ASSERT_MEM_DEFINED(digest_bin.data, len);
+ ERL_VALGRIND_ASSERT_MEM_DEFINED(tbs, len);
i = ECDSA_sign(md->type, tbs, len, sig_bin.data, &siglen, ec);
EC_KEY_free(ec);
#else