/* hmm... if a is between i and 2*i, things are bad */
if (a->top > i)
{
- j=bn_add_words(ret->d,ret->d,&(a->d[i]),i);
+ j=(int)(bn_add_words(ret->d,ret->d,&(a->d[i]),i));
if (j) /* overflow */
bn_sub_words(ret->d,ret->d,mont->N.d,i);
}
void BN_MONT_CTX_free(mont)
BN_MONT_CTX *mont;
{
+ if(mont == NULL)
+ return;
+
BN_free(&(mont->RR));
BN_free(&(mont->N));
BN_free(&(mont->Ni));