aboutsummaryrefslogtreecommitdiffhomepage
path: root/pyecsca/codegen
diff options
context:
space:
mode:
authorJ08nY2023-10-05 19:04:18 +0200
committerJ08nY2023-10-05 19:04:18 +0200
commit4d944fc9ffc5be9bfcccc6411314929864f7a696 (patch)
tree96da2e03a1213bad34aceba4f4ea88c85350d4b4 /pyecsca/codegen
parentc8b7d31d90256f75c859005f41f1cf7226e25481 (diff)
downloadpyecsca-codegen-4d944fc9ffc5be9bfcccc6411314929864f7a696.tar.gz
pyecsca-codegen-4d944fc9ffc5be9bfcccc6411314929864f7a696.tar.zst
pyecsca-codegen-4d944fc9ffc5be9bfcccc6411314929864f7a696.zip
Make sure wsliding array is zero.
Diffstat (limited to 'pyecsca/codegen')
-rw-r--r--pyecsca/codegen/bn/bn.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/pyecsca/codegen/bn/bn.c b/pyecsca/codegen/bn/bn.c
index 5e9164a..9ad4d59 100644
--- a/pyecsca/codegen/bn/bn.c
+++ b/pyecsca/codegen/bn/bn.c
@@ -472,6 +472,7 @@ wsliding_t *bn_wsliding_ltr(const bn_t *bn, int w) {
int blen = bn_bit_length(bn);
uint8_t arr[blen];
+ memset(arr, 0, blen * sizeof(uint8_t));
int b = blen - 1;
int u = 0;
@@ -540,6 +541,7 @@ wsliding_t *bn_wsliding_rtl(const bn_t *bn, int w) {
int blen = bn_bit_length(bn);
uint8_t arr[blen];
+ memset(arr, 0, blen * sizeof(uint8_t));
bn_t k;
if (mp_init(&k) != BN_OKAY) {