Fix warnings in expspeed.c (but the segmentation fault remains)
[openssl.git] / crypto / bn / bn_shift.c
index e4da833ea67f33aa68b22a7dde588ca182034358..37c6988da3dfdb1d358855a1a1d3802e3d554837 100644 (file)
@@ -128,8 +128,8 @@ int BN_lshift(BIGNUM *r, const BIGNUM *a, int n)
        BN_ULONG l;
 
        r->neg=a->neg;
-       if (bn_wexpand(r,a->top+(n/BN_BITS2)+1) == NULL) return(0);
        nw=n/BN_BITS2;
+       if (bn_wexpand(r,a->top+nw+1) == NULL) return(0);
        lb=n%BN_BITS2;
        rb=BN_BITS2-lb;
        f=a->d;