make sure fast_s_mp_mul_digs() doesn't BOF

This fixes #60 and #80
This commit is contained in:
Steffen Jaeckel 2017-08-29 16:53:31 +02:00
parent a4d905a030
commit 1d03522625

View File

@ -87,7 +87,7 @@ int fast_s_mp_mul_digs(const mp_int *a, const 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];
}