fixup! Improve readability of f_impl.c and f_impl.h
authorMatt Caswell <matt@openssl.org>
Fri, 16 Feb 2018 16:54:53 +0000 (16:54 +0000)
committerMatt Caswell <matt@openssl.org>
Tue, 20 Feb 2018 12:59:31 +0000 (12:59 +0000)
Reviewed-by: Bernd Edlinger <bernd.edlinger@hotmail.de>
(Merged from https://github.com/openssl/openssl/pull/5105)

crypto/ec/curve448/arch_32/f_impl.h

index 1543d10..bbde84a 100644 (file)
@@ -52,7 +52,7 @@ void gf_weak_reduce(gf a)
     unsigned int i;
 
     a->limb[NLIMBS / 2] += tmp;
-    for (i = 15; i > 0; i--)
+    for (i = NLIMBS - 1; i > 0; i--)
         a->limb[i] = (a->limb[i] & mask) + (a->limb[i - 1] >> 28);
     a->limb[0] = (a->limb[0] & mask) + tmp;
 }