summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/bn/bn_shift.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libcrypto/bn/bn_shift.c')
-rw-r--r--src/lib/libcrypto/bn/bn_shift.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/lib/libcrypto/bn/bn_shift.c b/src/lib/libcrypto/bn/bn_shift.c
index 0883247384..c2608f9f4a 100644
--- a/src/lib/libcrypto/bn/bn_shift.c
+++ b/src/lib/libcrypto/bn/bn_shift.c
@@ -172,6 +172,11 @@ int BN_rshift(BIGNUM *r, BIGNUM *a, int n)
172 r->neg=a->neg; 172 r->neg=a->neg;
173 if (bn_wexpand(r,a->top-nw+1) == NULL) return(0); 173 if (bn_wexpand(r,a->top-nw+1) == NULL) return(0);
174 } 174 }
175 else
176 {
177 if (n == 0)
178 return 1; /* or the copying loop will go berserk */
179 }
175 180
176 f= &(a->d[nw]); 181 f= &(a->d[nw]);
177 t=r->d; 182 t=r->d;