summaryrefslogtreecommitdiffhomepage
path: root/libtommath/bn_fast_s_mp_mul_digs.c
diff options
context:
space:
mode:
authorMatt Johnston <matt@ucc.asn.au>2018-03-05 16:50:24 +0800
committerMatt Johnston <matt@ucc.asn.au>2018-03-05 16:50:24 +0800
commit145fb9698929d247dffb35189397a3daff497431 (patch)
treee4c93592e06e01c1f087ad0fca413c6d98d9553c /libtommath/bn_fast_s_mp_mul_digs.c
parent084ff9b4c8adc31e91c6fa6a12a933170a2b7117 (diff)
Don't read uninitialised value.
From https://github.com/libtom/libtommath/commit/1d03522625f46214733e8e143a4765c01fc146f9
Diffstat (limited to 'libtommath/bn_fast_s_mp_mul_digs.c')
-rw-r--r--libtommath/bn_fast_s_mp_mul_digs.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libtommath/bn_fast_s_mp_mul_digs.c b/libtommath/bn_fast_s_mp_mul_digs.c
index a1015af..783e7ca 100644
--- a/libtommath/bn_fast_s_mp_mul_digs.c
+++ b/libtommath/bn_fast_s_mp_mul_digs.c
@@ -87,7 +87,7 @@ int fast_s_mp_mul_digs (mp_int * a, mp_int * b, mp_int * c, int digs)
{
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];
}