diff options
| author | J08nY | 2023-10-05 19:04:18 +0200 |
|---|---|---|
| committer | J08nY | 2023-10-05 19:04:18 +0200 |
| commit | 4d944fc9ffc5be9bfcccc6411314929864f7a696 (patch) | |
| tree | 96da2e03a1213bad34aceba4f4ea88c85350d4b4 /pyecsca/codegen | |
| parent | c8b7d31d90256f75c859005f41f1cf7226e25481 (diff) | |
| download | pyecsca-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.c | 2 |
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) { |
