comparison 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
comparison
equal deleted inserted replaced
1592:46506b32650a 1593:c8c20fb57a9a
85 c->used = pa; 85 c->used = pa;
86 86
87 { 87 {
88 mp_digit *tmpc; 88 mp_digit *tmpc;
89 tmpc = c->dp; 89 tmpc = c->dp;
90 for (ix = 0; ix < (pa + 1); ix++) { 90 for (ix = 0; ix < pa; ix++) {
91 /* now extract the previous digit [below the carry] */ 91 /* now extract the previous digit [below the carry] */
92 *tmpc++ = W[ix]; 92 *tmpc++ = W[ix];
93 } 93 }
94 94
95 /* clear unused digits [that existed in the old copy of c] */ 95 /* clear unused digits [that existed in the old copy of c] */