]> Git Repo - secp256k1.git/commitdiff
Fix bug in wnaf_fixed where the wnaf array is not completely zeroed when given a...
authorJonas Nick <[email protected]>
Fri, 23 Mar 2018 13:57:16 +0000 (13:57 +0000)
committerJonas Nick <[email protected]>
Fri, 23 Mar 2018 14:52:02 +0000 (14:52 +0000)
src/ecmult_impl.h

index 71ab284741dfc7bb6d78712138dc07e546737475..608d19b362e964c39b051922247e8ef98ef4f7f3 100644 (file)
@@ -571,9 +571,8 @@ static int secp256k1_wnaf_fixed(int *wnaf, const secp256k1_scalar *s, int w) {
     const secp256k1_scalar *work = s;
 
     if (secp256k1_scalar_is_zero(s)) {
-        while (pos * w < WNAF_BITS) {
+        for (pos = 0; pos < WNAF_SIZE(w); pos++) {
             wnaf[pos] = 0;
-            ++pos;
         }
         return 0;
     }
This page took 0.025482 seconds and 4 git commands to generate.