forked from wolfSSL/wolfssl
fix normal math off by one loop error in fast_s_mp_mul_high_digs
This commit is contained in:
@ -3763,7 +3763,7 @@ int fast_s_mp_mul_high_digs (mp_int * a, mp_int * b, mp_int * c, int digs)
|
|||||||
register mp_digit *tmpc;
|
register mp_digit *tmpc;
|
||||||
|
|
||||||
tmpc = c->dp + digs;
|
tmpc = c->dp + digs;
|
||||||
for (ix = digs; ix <= pa; ix++) {
|
for (ix = digs; ix < pa; ix++) { /* TAO, <= could potentially overwrite */
|
||||||
/* now extract the previous digit [below the carry] */
|
/* now extract the previous digit [below the carry] */
|
||||||
*tmpc++ = W[ix];
|
*tmpc++ = W[ix];
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user