# HG changeset patch # User Matt Johnston # Date 1520239824 -28800 # Node ID c8c20fb57a9a402688d7d9d80e6596bb23f5b26f # Parent 46506b32650a3c64d4e7130c1a43d4888a6cf66a Don't read uninitialised value. From https://github.com/libtom/libtommath/commit/1d03522625f46214733e8e143a4765c01fc146f9 diff -r 46506b32650a -r c8c20fb57a9a libtommath/bn_fast_s_mp_mul_digs.c --- 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]; }