diff libtommath/bn_fast_s_mp_mul_digs.c @ 1593:c8c20fb57a9a

Don't read uninitialised value. From https://github.com/libtom/libtommath/commit/1d03522625f46214733e8e143a4765c01fc146f9
author Matt Johnston <matt@ucc.asn.au>
date Mon, 05 Mar 2018 16:50:24 +0800
parents 8bba51a55704
children f52919ffd3b1
line wrap: on
line diff
--- a/libtommath/bn_fast_s_mp_mul_digs.c	Mon Mar 05 16:29:57 2018 +0800
+++ b/libtommath/bn_fast_s_mp_mul_digs.c	Mon Mar 05 16:50:24 2018 +0800
@@ -87,7 +87,7 @@
   {
     mp_digit *tmpc;
     tmpc = c->dp;
-    for (ix = 0; ix < (pa + 1); ix++) {
+    for (ix = 0; ix < pa; ix++) {
       /* now extract the previous digit [below the carry] */
       *tmpc++ = W[ix];
     }