changeset 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 46506b32650a
children c69df5d5db94
files libtommath/bn_fast_s_mp_mul_digs.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
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];
     }