Eliminate dependency on UNICODE macro.
[oweals/openssl.git] / crypto / bn / bn_mul.c
index 6b633b90b021f2f88ee74266c360b15f5ae5b87c..aec1eafc65fbb25a8fbeda30f8f6025129a3c716 100644 (file)
@@ -964,7 +964,7 @@ int BN_mul(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, BN_CTX *ctx)
 
        if ((al == 0) || (bl == 0))
                {
-               if (!BN_zero(r)) goto err;
+               BN_zero(r);
                return(1);
                }
        top=al+bl;
@@ -1090,10 +1090,11 @@ int BN_mul(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, BN_CTX *ctx)
 #if defined(BN_MUL_COMBA) || defined(BN_RECURSION)
 end:
 #endif
-       bn_fix_top(rr);
+       bn_correct_top(rr);
        if (r != rr) BN_copy(r,rr);
        ret=1;
 err:
+       bn_check_top(r);
        BN_CTX_end(ctx);
        return(ret);
        }