aboutsummaryrefslogtreecommitdiffstats
path: root/lib/crypto
diff options
context:
space:
mode:
authorHans Nilsson <[email protected]>2019-06-24 15:52:49 +0200
committerHans Nilsson <[email protected]>2019-06-26 11:55:41 +0200
commit6e7af43438f9055babf35239688cd0dd4ac1131b (patch)
treec9d16c1da05ae2119e048971d2caa479936d7b23 /lib/crypto
parentdec33cc4bdcc71f139aca9f743967e5d70356932 (diff)
downloadotp-6e7af43438f9055babf35239688cd0dd4ac1131b.tar.gz
otp-6e7af43438f9055babf35239688cd0dd4ac1131b.tar.bz2
otp-6e7af43438f9055babf35239688cd0dd4ac1131b.zip
crypto: Adjust VALGRIND decls
Seem to detect false positives
Diffstat (limited to 'lib/crypto')
-rw-r--r--lib/crypto/c_src/bn.c7
1 files changed, 0 insertions, 7 deletions
diff --git a/lib/crypto/c_src/bn.c b/lib/crypto/c_src/bn.c
index 34ed4f7ebc..6021d56db6 100644
--- a/lib/crypto/c_src/bn.c
+++ b/lib/crypto/c_src/bn.c
@@ -32,8 +32,6 @@ int get_bn_from_mpint(ErlNifEnv* env, ERL_NIF_TERM term, BIGNUM** bnp)
if (bin.size > INT_MAX - 4)
goto err;
- ERL_VALGRIND_ASSERT_MEM_DEFINED(bin.data, bin.size);
-
if (bin.size < 4)
goto err;
sz = (int)bin.size - 4;
@@ -60,8 +58,6 @@ int get_bn_from_bin(ErlNifEnv* env, ERL_NIF_TERM term, BIGNUM** bnp)
if (bin.size > INT_MAX)
goto err;
- ERL_VALGRIND_ASSERT_MEM_DEFINED(bin.data, bin.size);
-
if ((ret = BN_bin2bn(bin.data, (int)bin.size, NULL)) == NULL)
goto err;
@@ -103,8 +99,6 @@ ERL_NIF_TERM mod_exp_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[])
unsigned extra_byte;
ERL_NIF_TERM ret;
- ASSERT(argc == 4);
-
if (!get_bn_from_bin(env, argv[0], &bn_base))
goto bad_arg;
if (!get_bn_from_bin(env, argv[1], &bn_exponent))
@@ -177,7 +171,6 @@ ERL_NIF_TERM bn2term(ErlNifEnv* env, const BIGNUM *bn)
BN_bn2bin(bn, ptr);
- ERL_VALGRIND_MAKE_MEM_DEFINED(ptr, dlen);
return ret;
err: