Hardcode numwords in semi-internal vli_clear()
diff --git a/tinycrypt/ecc_dsa.c b/tinycrypt/ecc_dsa.c
index 8c32ee8..67b4ac7 100644
--- a/tinycrypt/ecc_dsa.c
+++ b/tinycrypt/ecc_dsa.c
@@ -87,7 +87,7 @@
bits_size = num_n_bytes;
}
- uECC_vli_clear(native, num_n_words);
+ uECC_vli_clear(native);
uECC_vli_bytesToNative(native, bits, bits_size);
if (bits_size * 8 <= (unsigned)curve->num_n_bits) {
return;
@@ -134,7 +134,7 @@
/* If an RNG function was specified, get a random number
to prevent side channel analysis of k. */
if (!g_rng_function) {
- uECC_vli_clear(tmp, num_n_words);
+ uECC_vli_clear(tmp);
tmp[0] = 1;
}
else if (!uECC_generate_random_int(tmp, curve->n, num_n_words)) {
@@ -271,7 +271,7 @@
((!!uECC_vli_testBit(u2, num_bits - 1)) << 1)];
uECC_vli_set(rx, point, num_words);
uECC_vli_set(ry, point + num_words, num_words);
- uECC_vli_clear(z, num_words);
+ uECC_vli_clear(z);
z[0] = 1;
for (i = num_bits - 2; i >= 0; --i) {