diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-18 02:49:50 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-18 02:49:50 +0000 |
commit | 9835e2ae736235810b4ea1c162ca5e65c547e770 (patch) | |
tree | 3fcebf40ed70e581d776a8a4c65923e8ec20e026 /vendor/p384/src/arithmetic/macros.rs | |
parent | Releasing progress-linux version 1.70.0+dfsg2-1~progress7.99u1. (diff) | |
download | rustc-9835e2ae736235810b4ea1c162ca5e65c547e770.tar.xz rustc-9835e2ae736235810b4ea1c162ca5e65c547e770.zip |
Merging upstream version 1.71.1+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'vendor/p384/src/arithmetic/macros.rs')
-rw-r--r-- | vendor/p384/src/arithmetic/macros.rs | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/vendor/p384/src/arithmetic/macros.rs b/vendor/p384/src/arithmetic/macros.rs index 62789f245..88c4629e8 100644 --- a/vendor/p384/src/arithmetic/macros.rs +++ b/vendor/p384/src/arithmetic/macros.rs @@ -17,11 +17,15 @@ macro_rules! impl_field_invert { let mut d = 1; let mut f = $msat(); let mut g = [0; $nlimbs + 1]; - let mut v = Default::default(); + let mut v = [0; $nlimbs]; let mut r = $one; let mut i = 0; + let mut j = 0; - g[..$nlimbs].copy_from_slice($a.as_ref()); + while j < $nlimbs { + g[j] = $a[j]; + j += 1; + } while i < ITERATIONS - ITERATIONS % 2 { let (out1, out2, out3, out4, out5) = $divstep(d, &f, &g, &v, &r); |